pinctrl: at91: Delete an error message for a failed memory allocation in at91_pinctrl...
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 23 Dec 2017 19:44:27 +0000 (20:44 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 3 Jan 2018 07:46:49 +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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91.c

index 03492e3..297f1d1 100644 (file)
@@ -1050,10 +1050,8 @@ static int at91_pinctrl_mux_mask(struct at91_pinctrl *info,
        info->nmux = size / gpio_banks;
 
        info->mux_mask = devm_kzalloc(info->dev, sizeof(u32) * size, GFP_KERNEL);
-       if (!info->mux_mask) {
-               dev_err(info->dev, "could not alloc mux_mask\n");
+       if (!info->mux_mask)
                return -ENOMEM;
-       }
 
        ret = of_property_read_u32_array(np, "atmel,mux-mask",
                                          info->mux_mask, size);