]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: most: fix error return code in audio_probe_channel()
authorWei Yongjun <weiyongjun1@huawei.com>
Sun, 25 Sep 2016 15:41:11 +0000 (15:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2016 11:06:55 +0000 (13:06 +0200)
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 <weiyongjun1@huawei.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-sound/sound.c

index 3dc625c1d1f40756717ea20c6e05100996e8bc0d..00f01c91e389991573017e39d06588e41cf191a2 100644 (file)
@@ -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);