pinctrl: mvebu: Delete an error message for a failed memory allocation in mvebu_pinct...
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 19 Dec 2017 21:30:36 +0000 (22:30 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 20 Dec 2017 12:20:27 +0000 (13:20 +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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mvebu/pinctrl-mvebu.c

index 163d461..9e05cfa 100644 (file)
@@ -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);