Thread (23 messages) 23 messages, 3 authors, 2016-06-20
STALE3640d
Revisions (3)
  1. v3 current
  2. v4 [diff vs current]
  3. v5 [diff vs current]

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

From: Chris Lapa <hidden>
Date: 2016-06-17 05:01:03
Also in: linux-pm, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

From: Chris Lapa <redacted>

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

Signed-off-by: Chris Lapa <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help