lkml.org 
[lkml]   [2016]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] staging: most: fix error return code in audio_probe_channel()
On Mon, 26 Sep 2016 09:47:19 +0200
Andrey Shvetsov <andrey.shvetsov@k2l.de> wrote:

> On Sun, Sep 25, 2016 at 03:41:11PM +0000, Wei Yongjun wrote:
> > 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>
> Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>

Signed-off-by: Christian Gromm <christian.gromm@microchip.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);
> >
>

\
 
 \ /
  Last update: 2016-09-26 10:56    [W:0.036 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site