public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] staging: most: fix error return code in audio_probe_channel()
@ 2016-09-25 15:41 Wei Yongjun
  2016-09-25 17:26 ` Greg Kroah-Hartman
  2016-09-26  7:47 ` Andrey Shvetsov
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-09-25 15:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Christian Gromm, Andrey Shvetsov,
	Shraddha Barke
  Cc: Wei Yongjun, devel, linux-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/staging/most/aim-sound/sound.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/aim-sound/sound.c
index 3dc625c..00f01c9 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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-26  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-25 15:41 [PATCH -next] staging: most: fix error return code in audio_probe_channel() Wei Yongjun
2016-09-25 17:26 ` Greg Kroah-Hartman
2016-09-26  7:47 ` Andrey Shvetsov
2016-09-26  8:56   ` Christian Gromm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox