pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_uti...
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 25 Dec 2017 19:04:05 +0000 (20:04 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 3 Jan 2018 07:46:53 +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-utils.c

index 9189fba..f2bcbf6 100644 (file)
@@ -83,10 +83,8 @@ int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
 
        dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs),
                              GFP_KERNEL);
-       if (!dup_configs) {
-               dev_err(pctldev->dev, "kmemdup(configs) failed\n");
+       if (!dup_configs)
                return -ENOMEM;
-       }
 
        (*map)[*num_maps].type = type;
        (*map)[*num_maps].data.configs.group_or_pin = group;