From: Wei Yongjun <weiyj.lk@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Christian Gromm <christian.gromm@microchip.com>,
Andrey Shvetsov <andrey.shvetsov@k2l.de>,
Shraddha Barke <shraddha.6596@gmail.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH -next] staging: most: fix error return code in audio_probe_channel()
Date: Sun, 25 Sep 2016 15:41:11 +0000 [thread overview]
Message-ID: <1474818071-18972-1-git-send-email-weiyj.lk@gmail.com> (raw)
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);
next reply other threads:[~2016-09-25 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-25 15:41 Wei Yongjun [this message]
2016-09-25 17:26 ` [PATCH -next] staging: most: fix error return code in audio_probe_channel() Greg Kroah-Hartman
2016-09-26 7:47 ` Andrey Shvetsov
2016-09-26 8:56 ` Christian Gromm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474818071-18972-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=andrey.shvetsov@k2l.de \
--cc=christian.gromm@microchip.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shraddha.6596@gmail.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox