Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1535564

[PATCH 17/19] staging: iio: isl29028: remove out of memory log message

From Brian Masney <masneyb@onstation.org>
Newsgroups linux.kernel
Subject [PATCH 17/19] staging: iio: isl29028: remove out of memory log message
Date 2016-12-04 03:30 +0100
Message-ID <sKuIW-194-21@gated-at.bofh.it> (permalink)
References <sKuIV-194-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/staging/iio/light/isl29028.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c
index 3f01ad1..bda5183 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/drivers/staging/iio/light/isl29028.c
@@ -507,10 +507,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);
 
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 17/19] staging: iio: isl29028: remove out of memory log message Brian Masney <masneyb@onstation.org> - 2016-12-04 03:30 +0100

csiph-web