summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2019-04-29 17:24:09 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-05-05 12:51:07 +0100
commit5c25531d4b43c377544d2553f3a8e51d84037ca6 (patch)
treec4816ce5f055592b8db76c6effa87d8a137bc8c7
parentcf54f4dd07a652d9a0630ec4e82c5ff082d2a14e (diff)
downloadlinux-next-5c25531d4b43c377544d2553f3a8e51d84037ca6.tar.gz
iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing
devm_iio_device_alloc() can only fail due to a memory or IDA allocation failure. Hence there is no need to print a message, as the memory allocation or IIO core code already takes care of that. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/adc/rcar-gyroadc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
index 2c0d0316d149..2d685730f867 100644
--- a/drivers/iio/adc/rcar-gyroadc.c
+++ b/drivers/iio/adc/rcar-gyroadc.c
@@ -485,10 +485,8 @@ static int rcar_gyroadc_probe(struct platform_device *pdev)
int ret;
indio_dev = devm_iio_device_alloc(dev, sizeof(*priv));
- if (!indio_dev) {
- dev_err(dev, "Failed to allocate IIO device.\n");
+ if (!indio_dev)
return -ENOMEM;
- }
priv = iio_priv(indio_dev);
priv->dev = dev;