mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	<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 16:00:14 +0800	[thread overview]
Message-ID: <8c670bdb-2ee9-a5c3-972e-e488d12d7980@huawei.com> (raw)
In-Reply-To: <fb7f5595-5e70-98a1-220a-935f899773c6@metafoo.de>

On 2021/5/14 15:36, Lars-Peter Clausen wrote:
> 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.

Thanks, will send v2.

>>           dev_err(&st->sd.spi->dev, "device ID query failed\n");
>>           goto out;
>>       }
> 
> 
> .

      reply	other threads:[~2021-05-14  8:00 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
2021-05-14  8:00   ` YueHaibing [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=8c670bdb-2ee9-a5c3-972e-e488d12d7980@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=gregkh@suse.de \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --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

all inboxes | Powered by JetHome®