staging: iio: isl29028: remove out of memory log message
authorBrian Masney <masneyb@onstation.org>
Tue, 17 Jan 2017 09:24:57 +0000 (04:24 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sun, 22 Jan 2017 13:21:37 +0000 (13:21 +0000)
If the call to devm_iio_device_alloc() fails, then isl29028_probe()
logs a message saying that memory cannot be allocated. The user's system
most likely has larger issues at this point. This patch removes that
error message since the error code is passed on and the message is not
necessary.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/isl29028.c

index be1fc4a8960e4827e91184d7c563beea4149ff98..e93077b07c4fbb0d27e7c4970e99b7e6a6a204ac 100644 (file)
@@ -488,10 +488,8 @@ static int isl29028_probe(struct i2c_client *client,
        int ret;
 
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
-       if (!indio_dev) {
-               dev_err(&client->dev, "iio allocation fails\n");
+       if (!indio_dev)
                return -ENOMEM;
-       }
 
        chip = iio_priv(indio_dev);