Skip to content

Commit e2f5543

Browse files
Sachin Kamatjic23
authored andcommitted
iio: dac: ad5755: Remove redundant code
The if check is redundant as the value obtained from iio_device_register() is already in the required format. Error messages are already printed by iio_device_register(); hence not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 35b9c0b commit e2f5543

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎drivers/iio/dac/ad5755.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,7 @@ static int ad5755_probe(struct spi_device *spi)
589589
if (ret)
590590
return ret;
591591

592-
ret = iio_device_register(indio_dev);
593-
if (ret) {
594-
dev_err(&spi->dev, "Failed to register iio device: %d\n", ret);
595-
return ret;
596-
}
597-
598-
return 0;
592+
return iio_device_register(indio_dev);
599593
}
600594

601595
static int ad5755_remove(struct spi_device *spi)

0 commit comments

Comments
 (0)