* [PATCH] Input: adp5520-keys: Delete an error message for a failed memory allocation in adp5520_keys_probe()
@ 2018-01-27 14:20 SF Markus Elfring
2018-02-01 16:27 ` Michael Hennerich
0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2018-01-27 14:20 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov, Michael Hennerich; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 27 Jan 2018 15:15:52 +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/adp5520-keys.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c
index f0b9b37bde58..72e01cb77881 100644
--- a/drivers/input/keyboard/adp5520-keys.c
+++ b/drivers/input/keyboard/adp5520-keys.c
@@ -91,10 +91,8 @@ static int adp5520_keys_probe(struct platform_device *pdev)
return -EINVAL;
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
- if (!dev) {
- dev_err(&pdev->dev, "failed to alloc memory\n");
+ if (!dev)
return -ENOMEM;
- }
input = devm_input_allocate_device(&pdev->dev);
if (!input)
--
2.16.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: adp5520-keys: Delete an error message for a failed memory allocation in adp5520_keys_probe()
2018-01-27 14:20 [PATCH] Input: adp5520-keys: Delete an error message for a failed memory allocation in adp5520_keys_probe() SF Markus Elfring
@ 2018-02-01 16:27 ` Michael Hennerich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Hennerich @ 2018-02-01 16:27 UTC (permalink / raw)
To: SF Markus Elfring, linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors
On 27.01.2018 15:20, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 27 Jan 2018 15:15:52 +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>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
> drivers/input/keyboard/adp5520-keys.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c
> index f0b9b37bde58..72e01cb77881 100644
> --- a/drivers/input/keyboard/adp5520-keys.c
> +++ b/drivers/input/keyboard/adp5520-keys.c
> @@ -91,10 +91,8 @@ static int adp5520_keys_probe(struct platform_device *pdev)
> return -EINVAL;
>
> dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
> - if (!dev) {
> - dev_err(&pdev->dev, "failed to alloc memory\n");
> + if (!dev)
> return -ENOMEM;
> - }
>
> input = devm_input_allocate_device(&pdev->dev);
> if (!input)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-01 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-27 14:20 [PATCH] Input: adp5520-keys: Delete an error message for a failed memory allocation in adp5520_keys_probe() SF Markus Elfring
2018-02-01 16:27 ` Michael Hennerich
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).