[PATCH 1/3] irq-imx-gpcv2: Delete an error message for a failed memory allocation in imx_gpcv2_irqchip_init()

From: SF Markus Elfring
Date: Thu Jan 18 2018 - 16:14:57 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jan 2018 21:23:06 +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 <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/irqchip/irq-imx-gpcv2.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c
index 675eda5ff2b8..f08fcbb46b1b 100644
--- a/drivers/irqchip/irq-imx-gpcv2.c
+++ b/drivers/irqchip/irq-imx-gpcv2.c
@@ -225,10 +225,8 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node,
}

cd = kzalloc(sizeof(struct gpcv2_irqchip_data), GFP_KERNEL);
- if (!cd) {
- pr_err("kzalloc failed!\n");
+ if (!cd)
return -ENOMEM;
- }

raw_spin_lock_init(&cd->rlock);

--
2.15.1