Commit bd145561 authored by Tang Bin's avatar Tang Bin Committed by Jonathan Cameron

iio:adc:ad7766: Fix unnecessary check in ad7766_probe()

In the function ad7766_probe(), the return value of
devm_iio_device_register() can be zero or ret, Thus it
is unnecessary to repeated check here.
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Co-developed-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210511134739.948-1-tangbin@cmss.chinamobile.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 43fa7394
...@@ -290,10 +290,7 @@ static int ad7766_probe(struct spi_device *spi) ...@@ -290,10 +290,7 @@ static int ad7766_probe(struct spi_device *spi)
if (ret) if (ret)
return ret; return ret;
ret = devm_iio_device_register(&spi->dev, indio_dev); return devm_iio_device_register(&spi->dev, indio_dev);
if (ret)
return ret;
return 0;
} }
static const struct spi_device_id ad7766_id[] = { static const struct spi_device_id ad7766_id[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment