linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IRQ-Renesas: Delete an error message for a failed memory allocation in two functions
@ 2018-01-19 19:40 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-01-19 19:40 UTC (permalink / raw)
  To: kernel-janitors, Jason Cooper, Marc Zyngier, Thomas Gleixner
  Cc: LKML, Magnus Damm, Simon Horman

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 19 Jan 2018 20:32:04 +0100

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/irqchip/irq-renesas-intc-irqpin.c | 4 +---
 drivers/irqchip/irq-renesas-irqc.c        | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index cee59fe1321c..2a7f311b19e4 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -410,10 +410,8 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 	int k;
 
 	p = devm_kzalloc(dev, sizeof(*p), GFP_KERNEL);
-	if (!p) {
-		dev_err(dev, "failed to allocate driver data\n");
+	if (!p)
 		return -ENOMEM;
-	}
 
 	/* deal with driver instance configuration */
 	of_property_read_u32(dev->of_node, "sense-bitfield-width",
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 52304b139aa4..8c2c5d92f688 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -151,7 +151,6 @@ static int irqc_probe(struct platform_device *pdev)
 
 	p = kzalloc(sizeof(*p), GFP_KERNEL);
 	if (!p) {
-		dev_err(&pdev->dev, "failed to allocate driver data\n");
 		ret = -ENOMEM;
 		goto err0;
 	}
-- 
2.15.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-19 19:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19 19:40 [PATCH] IRQ-Renesas: Delete an error message for a failed memory allocation in two functions SF Markus Elfring

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).