From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966112AbcIZI4e (ORCPT ); Mon, 26 Sep 2016 04:56:34 -0400 Received: from exsmtp03.microchip.com ([198.175.253.49]:62466 "EHLO email.microchip.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966041AbcIZI4c (ORCPT ); Mon, 26 Sep 2016 04:56:32 -0400 Date: Mon, 26 Sep 2016 10:56:06 +0200 From: Christian Gromm To: Wei Yongjun , Greg Kroah-Hartman CC: Andrey Shvetsov , Shraddha Barke , Wei Yongjun , , Subject: Re: [PATCH -next] staging: most: fix error return code in audio_probe_channel() Message-ID: <20160926105606.4d4033be@muaddib> In-Reply-To: <20160926074718.GA456@KAR-DK-M21181.mchp-main.com> References: <1474818071-18972-1-git-send-email-weiyj.lk@gmail.com> <20160926074718.GA456@KAR-DK-M21181.mchp-main.com> Organization: MCHP MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Sep 2016 09:47:19 +0200 Andrey Shvetsov wrote: > On Sun, Sep 25, 2016 at 03:41:11PM +0000, Wei Yongjun wrote: > > From: Wei Yongjun > > > > 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 > Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm > > > --- > > 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); > > >