diff options
author | Peter Meerwald-Stadler <pmeerw@pmeerw.net> | 2016-07-05 13:55:37 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-07-10 14:48:35 +0100 |
commit | ab5b9492c0f43511ada25b3209d5645415858967 (patch) | |
tree | cc1e35a6ae6c0629ce314aaf2c0c2e25fb8d6bd7 /drivers | |
parent | 13e6d634c1c26b81a90c9a9cc5c56f95fad5195c (diff) | |
download | linux-ab5b9492c0f43511ada25b3209d5645415858967.tar.gz linux-ab5b9492c0f43511ada25b3209d5645415858967.tar.bz2 linux-ab5b9492c0f43511ada25b3209d5645415858967.zip |
staging: iio: isl29018: Remove excessive output messages
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/light/isl29018.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 059933734ff4..875007ff25a7 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -341,10 +341,8 @@ static ssize_t store_prox_infrared_suppression(struct device *dev, if (kstrtoint(buf, 10, &val)) return -EINVAL; - if (!(val == 0 || val == 1)) { - dev_err(dev, "The mode is not supported\n"); + if (!(val == 0 || val == 1)) return -EINVAL; - } /* * get the "proximity scheme" i.e. if the chip does on chip @@ -727,10 +725,8 @@ static int isl29018_probe(struct i2c_client *client, int dev_id = 0; 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); i2c_set_clientdata(client, indio_dev); @@ -770,13 +766,7 @@ static int isl29018_probe(struct i2c_client *client, indio_dev->name = name; indio_dev->dev.parent = &client->dev; indio_dev->modes = INDIO_DIRECT_MODE; - err = devm_iio_device_register(&client->dev, indio_dev); - if (err) { - dev_err(&client->dev, "iio registration fails\n"); - return err; - } - - return 0; + return devm_iio_device_register(&client->dev, indio_dev); } #ifdef CONFIG_PM_SLEEP |