Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Tang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Co-developed-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210511134739.948-1-tangbin@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Tang Bin and committed by
Jonathan Cameron
bd145561 43fa7394

+1 -4
+1 -4
drivers/iio/adc/ad7766.c
··· 290 290 if (ret) 291 291 return ret; 292 292 293 - ret = devm_iio_device_register(&spi->dev, indio_dev); 294 - if (ret) 295 - return ret; 296 - return 0; 293 + return devm_iio_device_register(&spi->dev, indio_dev); 297 294 } 298 295 299 296 static const struct spi_device_id ad7766_id[] = {