All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Hartmut Knaack <knaack.h@gmx.de>, linux-iio@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Martin Fuzzey <mfuzzey@parkeon.com>,
	Roberta Dobrescu <roberta.dobrescu@gmail.com>,
	martink@posteo.de
Subject: Re: [PATCH 3/7] iio:accel:mma8452: pass up real error code
Date: Sat, 8 Aug 2015 17:30:04 +0100	[thread overview]
Message-ID: <55C62E8C.5040407@kernel.org> (raw)
In-Reply-To: <cbf8195dee344145ca006a09650ba0da10613c09.1438483410.git.knaack.h@gmx.de>

On 02/08/15 21:43, Hartmut Knaack wrote:
> Pass up the error code provided by functions.
> 
> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Applied
> ---
>  drivers/iio/accel/mma8452.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index 153f26bc88dc..1463392f679c 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -343,7 +343,7 @@ static int mma8452_set_hp_filter_frequency(struct mma8452_data *data,
>  
>  	i = mma8452_get_hp_filter_index(data, val, val2);
>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	reg = i2c_smbus_read_byte_data(data->client,
>  				       MMA8452_HP_FILTER_CUTOFF);
> @@ -369,7 +369,7 @@ static int mma8452_write_raw(struct iio_dev *indio_dev,
>  	case IIO_CHAN_INFO_SAMP_FREQ:
>  		i = mma8452_get_samp_freq_index(data, val, val2);
>  		if (i < 0)
> -			return -EINVAL;
> +			return i;
>  
>  		data->ctrl_reg1 &= ~MMA8452_CTRL_DR_MASK;
>  		data->ctrl_reg1 |= i << MMA8452_CTRL_DR_SHIFT;
> @@ -378,7 +378,7 @@ static int mma8452_write_raw(struct iio_dev *indio_dev,
>  	case IIO_CHAN_INFO_SCALE:
>  		i = mma8452_get_scale_index(data, val, val2);
>  		if (i < 0)
> -			return -EINVAL;
> +			return i;
>  		data->data_cfg &= ~MMA8452_DATA_CFG_FS_MASK;
>  		data->data_cfg |= i;
>  		return mma8452_change_config(data, MMA8452_DATA_CFG,
> 


  reply	other threads:[~2015-08-08 16:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-02 20:43 [PATCH 0/7] mma8452 fixes and cleanup Hartmut Knaack
2015-08-02 20:43 ` [PATCH 1/7] iio:accel:mma8452: fix _get_hp_filter_index Hartmut Knaack
2015-08-08 16:28   ` Jonathan Cameron
2015-08-02 20:43 ` [PATCH 2/7] iio:accel:mma8452: drop double include Hartmut Knaack
2015-08-08 16:28   ` Jonathan Cameron
2015-08-02 20:43 ` [PATCH 3/7] iio:accel:mma8452: pass up real error code Hartmut Knaack
2015-08-08 16:30   ` Jonathan Cameron [this message]
2015-08-02 20:43 ` [PATCH 4/7] iio:accel:mma8452: check values to be written Hartmut Knaack
2015-08-08 16:31   ` Jonathan Cameron
2015-08-02 20:43 ` [PATCH 5/7] iio:accel:mma8452: rework register definitions Hartmut Knaack
2015-08-08 16:36   ` Jonathan Cameron
2015-08-09  9:01     ` Hartmut Knaack
2015-08-02 20:43 ` [PATCH 6/7] iio:accel:mma8452: coding style cleanup Hartmut Knaack
2015-08-08 16:37   ` Jonathan Cameron
2015-08-02 20:43 ` [PATCH 7/7] iio:accel:mma8452: reorder Kconfig entry Hartmut Knaack
2015-08-08 16:38   ` Jonathan Cameron

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=55C62E8C.5040407@kernel.org \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=martink@posteo.de \
    --cc=mfuzzey@parkeon.com \
    --cc=pmeerw@pmeerw.net \
    --cc=roberta.dobrescu@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.