* [PATCH] pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs()
@ 2017-12-25 19:15 SF Markus Elfring
2018-01-02 8:53 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-12-25 19:15 UTC (permalink / raw)
To: linux-gpio, Laxman Dewangan, Linus Walleij, Stephen Warren
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 25 Dec 2017 20:04:05 +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/pinctrl/pinctrl-utils.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-utils.c b/drivers/pinctrl/pinctrl-utils.c
index 9189fbafb102..f2bcbf62c03d 100644
--- a/drivers/pinctrl/pinctrl-utils.c
+++ b/drivers/pinctrl/pinctrl-utils.c
@@ -83,10 +83,8 @@ int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs),
GFP_KERNEL);
- if (!dup_configs) {
- dev_err(pctldev->dev, "kmemdup(configs) failed\n");
+ if (!dup_configs)
return -ENOMEM;
- }
(*map)[*num_maps].type = type;
(*map)[*num_maps].data.configs.group_or_pin = group;
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs()
2017-12-25 19:15 [PATCH] pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs() SF Markus Elfring
@ 2018-01-02 8:53 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2018-01-02 8:53 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-gpio, Laxman Dewangan, Stephen Warren, LKML,
kernel-janitors
On Mon, Dec 25, 2017 at 8:15 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 25 Dec 2017 20:04:05 +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>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-02 8:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-25 19:15 [PATCH] pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs() SF Markus Elfring
2018-01-02 8:53 ` Linus Walleij
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).