Thread (5 messages) 5 messages, 2 authors, 2018-01-02
STALE3115d

[PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe()

From: SF Markus Elfring <hidden>
Date: 2017-12-25 13:06:35
Also in: kernel-janitors, linux-gpio, linux-omap, lkml
Subsystem: pin control subsystem, pin controller - single, the rest · Maintainers: Linus Walleij, Tony Lindgren, Haojian Zhuang, Linus Torvalds

From: Markus Elfring <redacted>
Date: Mon, 25 Dec 2017 11:27:55 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <redacted>
---
 drivers/pinctrl/pinctrl-single.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index e6cd8de793e2..f5ff2111481d 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1646,10 +1646,9 @@ static int pcs_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	pcs = devm_kzalloc(&pdev->dev, sizeof(*pcs), GFP_KERNEL);
-	if (!pcs) {
-		dev_err(&pdev->dev, "could not allocate\n");
+	if (!pcs)
 		return -ENOMEM;
-	}
+
 	pcs->dev = &pdev->dev;
 	pcs->np = np;
 	raw_spin_lock_init(&pcs->lock);
-- 
2.15.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