* [PATCH] pinctrl: tz1090: Delete an error message for a failed memory allocation in two functions
@ 2017-12-25 17:13 SF Markus Elfring
2018-01-02 8:51 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-12-25 17:13 UTC (permalink / raw)
To: linux-gpio, James Hogan, Linus Walleij
Cc: LKML, kernel-janitors, Grant Likely, Rob Herring, Rob Landley
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 25 Dec 2017 17:55:48 +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/pinctrl/pinctrl-tz1090.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-tz1090.c b/drivers/pinctrl/pinctrl-tz1090.c
index 74d1ffcc2199..2379ce2be365 100644
--- a/drivers/pinctrl/pinctrl-tz1090.c
+++ b/drivers/pinctrl/pinctrl-tz1090.c
@@ -1082,10 +1082,8 @@ static int add_map_configs(struct device *dev,
dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs),
GFP_KERNEL);
- if (!dup_configs) {
- dev_err(dev, "kmemdup(configs) failed\n");
+ if (!dup_configs)
return -ENOMEM;
- }
(*map)[*num_maps].type = PIN_MAP_TYPE_CONFIGS_GROUP;
(*map)[*num_maps].data.configs.group_or_pin = group;
@@ -1946,10 +1944,9 @@ static int tz1090_pinctrl_probe(struct platform_device *pdev)
struct resource *res;
pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
- if (!pmx) {
- dev_err(&pdev->dev, "Can't alloc tz1090_pmx\n");
+ if (!pmx)
return -ENOMEM;
- }
+
pmx->dev = &pdev->dev;
spin_lock_init(&pmx->lock);
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: tz1090: Delete an error message for a failed memory allocation in two functions
2017-12-25 17:13 [PATCH] pinctrl: tz1090: Delete an error message for a failed memory allocation in two functions SF Markus Elfring
@ 2018-01-02 8:51 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2018-01-02 8:51 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-gpio, James Hogan, LKML, kernel-janitors, Grant Likely,
Rob Herring, Rob Landley
On Mon, Dec 25, 2017 at 6:13 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 25 Dec 2017 17:55:48 +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>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-02 8:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-25 17:13 [PATCH] pinctrl: tz1090: Delete an error message for a failed memory allocation in two functions SF Markus Elfring
2018-01-02 8:51 ` 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).