diff options
author | Wei Yongjun <[email protected]> | 2016-09-25 15:41:11 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2016-09-27 13:06:55 +0200 |
commit | ca8b3fa7ea44738f02979dfdc72a1d75a27dcddb (patch) | |
tree | d1d40015df738bacb78717f68ec418229fdf4b26 | |
parent | 264f7b8ac3ec3e7a38affd8140da30f8720b5946 (diff) |
staging: most: fix error return code in audio_probe_channel()
Fix to return a negative error code from the audio_set_hw_params() error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Andrey Shvetsov <[email protected]>
Signed-off-by: Christian Gromm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/most/aim-sound/sound.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/aim-sound/sound.c index 3dc625c1d1f4..00f01c91e389 100644 --- a/drivers/staging/most/aim-sound/sound.c +++ b/drivers/staging/most/aim-sound/sound.c @@ -607,7 +607,8 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, channel->id = channel_id; init_waitqueue_head(&channel->playback_waitq); - if (audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg)) + ret = audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg); + if (ret) goto err_free_card; snprintf(card->driver, sizeof(card->driver), "%s", DRIVER_NAME); |