public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: adc: ad9467: return ENODEV vs EINVAL in ad9467_setup()
Date: Wed, 16 Sep 2020 19:16:14 +0100	[thread overview]
Message-ID: <20200916191614.3e189d42@archlinux> (raw)
In-Reply-To: <20200916082221.72851-1-alexandru.ardelean@analog.com>

On Wed, 16 Sep 2020 11:22:21 +0300
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> The proper error code should be ENODEV (vs EINVAL) in case the chip ID
> isn't recognized.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ad9467.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
> index 1e8fd83b9bc2..8a6682b567be 100644
> --- a/drivers/iio/adc/ad9467.c
> +++ b/drivers/iio/adc/ad9467.c
> @@ -324,7 +324,7 @@ static int ad9467_setup(struct ad9467_state *st, unsigned int chip_id)
>  				  AN877_ADC_OUTPUT_MODE_TWOS_COMPLEMENT;
>  		return 0;
>  	default:
> -		return -EINVAL;
> +		return -ENODEV;
>  	}
>  }
>  


      reply	other threads:[~2020-09-16 18:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  8:22 [PATCH] iio: adc: ad9467: return ENODEV vs EINVAL in ad9467_setup() Alexandru Ardelean
2020-09-16 18:16 ` 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=20200916191614.3e189d42@archlinux \
    --to=jic23@kernel.org \
    --cc=alexandru.ardelean@analog.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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