From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755325AbcIYR0r (ORCPT ); Sun, 25 Sep 2016 13:26:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43719 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753751AbcIYR0q (ORCPT ); Sun, 25 Sep 2016 13:26:46 -0400 Date: Sun, 25 Sep 2016 19:26:49 +0200 From: Greg Kroah-Hartman To: Wei Yongjun Cc: Christian Gromm , Andrey Shvetsov , Shraddha Barke , devel@driverdev.osuosl.org, Wei Yongjun , linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] staging: most: fix error return code in audio_probe_channel() Message-ID: <20160925172649.GA21177@kroah.com> References: <1474818071-18972-1-git-send-email-weiyj.lk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1474818071-18972-1-git-send-email-weiyj.lk@gmail.com> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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; Are you sure you want that error value? I need an ack from the driver maintainers before I can take this... thanks, greg k-h