From: Lars-Peter Clausen <lars@metafoo.de>
To: YueHaibing <yuehaibing@huawei.com>,
Michael.Hennerich@analog.com, jic23@kernel.org, gregkh@suse.de
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] iio: adc: ad7793: Add missing error code in ad7793_setup()
Date: Fri, 14 May 2021 09:36:01 +0200 [thread overview]
Message-ID: <fb7f5595-5e70-98a1-220a-935f899773c6@metafoo.de> (raw)
In-Reply-To: <20210514065431.4328-1-yuehaibing@huawei.com>
On 5/14/21 8:54 AM, YueHaibing wrote:
> Set error code while device ID query failed.
>
> Fixes: 88bc30548aae ("IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Hi,
Thanks for finding and fixing this. One small comment.
> ---
> drivers/iio/adc/ad7793.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
> index 5e980a06258e..b4f9ac3838e1 100644
> --- a/drivers/iio/adc/ad7793.c
> +++ b/drivers/iio/adc/ad7793.c
> @@ -279,6 +279,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,
> id &= AD7793_ID_MASK;
>
> if (id != st->chip_info->id) {
> + ret = -EINVAL;
Usually we use ENODEV as the error code when the device ID does not match.
> dev_err(&st->sd.spi->dev, "device ID query failed\n");
> goto out;
> }
next prev parent reply other threads:[~2021-05-14 7:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 6:54 YueHaibing
2021-05-14 7:36 ` Lars-Peter Clausen [this message]
2021-05-14 8:00 ` YueHaibing
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=fb7f5595-5e70-98a1-220a-935f899773c6@metafoo.de \
--to=lars@metafoo.de \
--cc=Michael.Hennerich@analog.com \
--cc=gregkh@suse.de \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuehaibing@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®