lkml.org 
[lkml]   [2021]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 048/177] iio: adc: ad7793: Add missing error code in ad7793_setup()
    Date
    From: YueHaibing <yuehaibing@huawei.com>

    commit 4ed243b1da169bcbc1ec5507867e56250c5f1ff9 upstream.

    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>
    Cc: <Stable@vger.kernel.org>
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/iio/adc/ad7793.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/iio/adc/ad7793.c
    +++ b/drivers/iio/adc/ad7793.c
    @@ -278,6 +278,7 @@ static int ad7793_setup(struct iio_dev *
    id &= AD7793_ID_MASK;

    if (id != st->chip_info->id) {
    + ret = -ENODEV;
    dev_err(&st->sd.spi->dev, "device ID query failed\n");
    goto out;
    }

    \
     
     \ /
      Last update: 2021-05-31 17:30    [W:4.747 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site