From: Markus Elfring Date: Sat, 26 Aug 2017 18:30:04 +0000 (+0200) Subject: pinctrl: Delete an error message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b21e72e8ce7f70f53f3cc3d2d47568e7f6029d2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git pinctrl: Delete an error message Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index 0a20afc2210c..1ff6c3573493 100644 --- a/drivers/pinctrl/devicetree.c +++ b/drivers/pinctrl/devicetree.c @@ -83,7 +83,6 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename, /* Remember the converted mapping table entries */ dt_map = kzalloc(sizeof(*dt_map), GFP_KERNEL); if (!dt_map) { - dev_err(p->dev, "failed to alloc struct pinctrl_dt_map\n"); dt_free_map(pctldev, map, num_maps); return -ENOMEM; } @@ -158,10 +157,8 @@ static int dt_remember_dummy_state(struct pinctrl *p, const char *statename) struct pinctrl_map *map; map = kzalloc(sizeof(*map), GFP_KERNEL); - if (!map) { - dev_err(p->dev, "failed to alloc struct pinctrl_map\n"); + if (!map) return -ENOMEM; - } /* There is no pctldev for PIN_MAP_TYPE_DUMMY_STATE */ map->type = PIN_MAP_TYPE_DUMMY_STATE;