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


Groups > linux.kernel > #1424642

[PATCH v3 6/7] max8903: remove unnecessary 'out of memory' error message.

From Chris Lapa <chris@lapa.com.au>
Newsgroups linux.kernel
Subject [PATCH v3 6/7] max8903: remove unnecessary 'out of memory' error message.
Date 2016-06-17 07:10 +0200
Message-ID <rKUcx-2fy-1@gated-at.bofh.it> (permalink)
References <rFuC5-2sz-13@gated-at.bofh.it> <rKUcx-2fy-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Chris Lapa <chris@lapa.com.au>

Remove the 'out of memory' error message as it is printed by the core.

Signed-off-by: Chris Lapa <chris@lapa.com.au>
---
 drivers/power/max8903_charger.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/power/max8903_charger.c b/drivers/power/max8903_charger.c
index bfb81a2..5ddc667 100644
--- a/drivers/power/max8903_charger.c
+++ b/drivers/power/max8903_charger.c
@@ -196,10 +196,8 @@ static int max8903_probe(struct platform_device *pdev)
 	}
 
 	data = devm_kzalloc(dev, sizeof(struct max8903_data), GFP_KERNEL);
-	if (data == NULL) {
-		dev_err(dev, "Cannot allocate memory.\n");
+	if (!data)
 		return -ENOMEM;
-	}
 
 	data->pdata = pdev->dev.platform_data;
 	data->dev = dev;
-- 
1.9.1

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


Thread

[PATCH v3 6/7] max8903: remove unnecessary 'out of memory' error message. Chris Lapa <chris@lapa.com.au> - 2016-06-17 07:10 +0200

csiph-web