pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinct...
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 27 Dec 2017 21:44:04 +0000 (22:44 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 3 Jan 2018 07:46:55 +0000 (08:46 +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: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/spear/pinctrl-spear.c

index 4db52ba..efe79d3 100644 (file)
@@ -361,10 +361,8 @@ int spear_pinctrl_probe(struct platform_device *pdev,
                return -ENODEV;
 
        pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
-       if (!pmx) {
-               dev_err(&pdev->dev, "Can't alloc spear_pmx\n");
+       if (!pmx)
                return -ENOMEM;
-       }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        pmx->vbase = devm_ioremap_resource(&pdev->dev, res);