linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Pan Bian <bianpan201602@163.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, Pan Bian <bianpan2016@163.com>
Subject: Re: [PATCH 1/1] staging: iio: cdc: fix improper return value
Date: Sun, 4 Dec 2016 10:58:21 +0000	[thread overview]
Message-ID: <4c6e37ee-43bf-78a8-9aa9-7103715fd9e3@kernel.org> (raw)
In-Reply-To: <1480772670-6898-1-git-send-email-bianpan201602@163.com>

On 03/12/16 13:44, Pan Bian wrote:
> From: Pan Bian <bianpan2016@163.com>
> 
> At the end of function ad7150_write_event_config(), directly returns 0.
> As a result, the errors will be ignored by the callers. It may be better 
> to return variable "ret".
> 
> Signed-off-by: Pan Bian <bianpan2016@163.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/cdc/ad7150.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
> index 5578a07..50a5b0c2 100644
> --- a/drivers/staging/iio/cdc/ad7150.c
> +++ b/drivers/staging/iio/cdc/ad7150.c
> @@ -274,7 +274,7 @@ static int ad7150_write_event_config(struct iio_dev *indio_dev,
>  error_ret:
>  	mutex_unlock(&chip->state_lock);
>  
> -	return 0;
> +	return ret;
>  }
>  
>  static int ad7150_read_event_value(struct iio_dev *indio_dev,
> 

      reply	other threads:[~2016-12-04 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 13:44 [PATCH 1/1] staging: iio: cdc: fix improper return value Pan Bian
2016-12-04 10:58 ` Jonathan Cameron [this message]

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=4c6e37ee-43bf-78a8-9aa9-7103715fd9e3@kernel.org \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=bianpan201602@163.com \
    --cc=bianpan2016@163.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).