summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mvebu
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-12-20 00:30:36 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-12-20 15:20:27 +0300
commitbca50ce005731251edb663fc3519fa4a21ce309c (patch)
tree141eaee401629d91c67409a16c6683e9b1cc3af5 /drivers/pinctrl/mvebu
parentc2584927b7c89b0f28f5776e65a26944a07dffd3 (diff)
downloadlinux-bca50ce005731251edb663fc3519fa4a21ce309c.tar.xz
pinctrl: mvebu: Delete an error message for a failed memory allocation in mvebu_pinctrl_probe()
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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mvebu')
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-mvebu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 163d4614b0f8..9e05cfaf75f0 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -636,10 +636,9 @@ int mvebu_pinctrl_probe(struct platform_device *pdev)
*/
size = pctl->num_groups * sizeof(*pctl->groups) + noname * 8;
p = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
- if (!p) {
- dev_err(&pdev->dev, "failed to alloc group data\n");
+ if (!p)
return -ENOMEM;
- }
+
pctl->groups = p;
noname_buf = p + pctl->num_groups * sizeof(*pctl->groups);