linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, lars@metafoo.de, knaack.h@gmx.de,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: [PATCH 2/9] staging: iio: isl29018: Remove excessive output messages
Date: Tue,  5 Jul 2016 13:55:37 +0200	[thread overview]
Message-ID: <1467719744-19450-3-git-send-email-pmeerw@pmeerw.net> (raw)
In-Reply-To: <1467719744-19450-1-git-send-email-pmeerw@pmeerw.net>

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
---
 drivers/staging/iio/light/isl29018.c |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
index 0599337..875007f 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
-- 
1.7.10.4


  parent reply	other threads:[~2016-07-05 11:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 11:55 [PATCH 0/9] staging: iio: isl29018 and isl29028 cleanup Peter Meerwald-Stadler
2016-07-05 11:55 ` [PATCH 1/9] staging: iio: isl29018: Prefix #defines Peter Meerwald-Stadler
2016-07-05 11:55 ` Peter Meerwald-Stadler [this message]
2016-07-05 11:55 ` [PATCH 3/9] staging: iio: isl29018: Drop newlines Peter Meerwald-Stadler
2016-07-05 11:55 ` [PATCH 4/9] staging: iio: isl29018: Cleanup of comments Peter Meerwald-Stadler
2016-07-05 11:55 ` [PATCH 5/9] staging: iio: isl29018: Prefix remaining functions Peter Meerwald-Stadler
2016-07-05 11:55 ` [PATCH 6/9] staging: iio: isl29028: Prefix #defines Peter Meerwald-Stadler
2016-07-05 11:55 ` [PATCH 7/9] staging: iio: isl29028: Prefix stuff Peter Meerwald-Stadler
2016-07-05 11:55 ` [PATCH 8/9] staging: iio: isl29028: Expose scale and sample frequency available without comma Peter Meerwald-Stadler
2016-07-05 11:55 ` [PATCH 9/9] staging: iio: isl29028: Prefix functions Peter Meerwald-Stadler
2016-07-10 13:52 ` [PATCH 0/9] staging: iio: isl29018 and isl29028 cleanup Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467719744-19450-3-git-send-email-pmeerw@pmeerw.net \
    --to=pmeerw@pmeerw.net \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).