All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: imx_keypad: Delete an error message for a failed memory allocation in imx_keypad_probe()
@ 2018-01-27 13:23 ` SF Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2018-01-27 13:23 UTC (permalink / raw)
  To: linux-input, Dmitry Torokhov, Kees Cook; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 27 Jan 2018 14:14:04 +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@users.sourceforge.net>
---
 drivers/input/keyboard/imx_keypad.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index 25d61d8d4fc4..859f9c9f3aae 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -447,10 +447,8 @@ static int imx_keypad_probe(struct platform_device *pdev)
 	}
 
 	keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL);
-	if (!keypad) {
-		dev_err(&pdev->dev, "not enough memory for driver data\n");
+	if (!keypad)
 		return -ENOMEM;
-	}
 
 	keypad->input_dev = input_dev;
 	keypad->irq = irq;
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] Input: imx_keypad: Delete an error message for a failed memory allocation in imx_keypad_prob
@ 2018-01-27 13:23 ` SF Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2018-01-27 13:23 UTC (permalink / raw)
  To: linux-input, Dmitry Torokhov, Kees Cook; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 27 Jan 2018 14:14:04 +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@users.sourceforge.net>
---
 drivers/input/keyboard/imx_keypad.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index 25d61d8d4fc4..859f9c9f3aae 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -447,10 +447,8 @@ static int imx_keypad_probe(struct platform_device *pdev)
 	}
 
 	keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL);
-	if (!keypad) {
-		dev_err(&pdev->dev, "not enough memory for driver data\n");
+	if (!keypad)
 		return -ENOMEM;
-	}
 
 	keypad->input_dev = input_dev;
 	keypad->irq = irq;
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-27 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-27 13:23 [PATCH] Input: imx_keypad: Delete an error message for a failed memory allocation in imx_keypad_probe() SF Markus Elfring
2018-01-27 13:23 ` [PATCH] Input: imx_keypad: Delete an error message for a failed memory allocation in imx_keypad_prob SF Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.