iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 29 Apr 2019 15:24:09 +0000 (17:24 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 5 May 2019 11:51:07 +0000 (12:51 +0100)
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>
drivers/iio/adc/rcar-gyroadc.c

index 2c0d031..2d68573 100644 (file)
@@ -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;