pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_p...
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 27 Dec 2017 21:04:22 +0000 (22:04 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 28 Dec 2017 12:41:02 +0000 (13:41 +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: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-msm.c

index 7a96059..495432f 100644 (file)
@@ -898,10 +898,9 @@ int msm_pinctrl_probe(struct platform_device *pdev,
        int ret;
 
        pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
-       if (!pctrl) {
-               dev_err(&pdev->dev, "Can't allocate msm_pinctrl\n");
+       if (!pctrl)
                return -ENOMEM;
-       }
+
        pctrl->dev = &pdev->dev;
        pctrl->soc = soc_data;
        pctrl->chip = msm_gpio_template;