From: Geert Uytterhoeven Date: Mon, 29 Apr 2019 15:24:09 +0000 (+0200) Subject: iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5c25531d4b43c377544d2553f3a8e51d84037ca6;p=linux.git 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c index 2c0d0316d1497..2d685730f8673 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;