aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-26 14:30:04 -0400
committerLinus Walleij <linus.walleij@linaro.org>2017-08-31 09:45:29 -0400
commit9b21e72e8ce7f70f53f3cc3d2d47568e7f6029d2 (patch)
treefe3b8a653c67025a7cf32081ff1f47d697a57c2c
parentf68f8481316cc13a2bdf86efe49e251ac7c8946f (diff)
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 <elfring@users.sourceforge.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/devicetree.c5
1 files changed, 1 insertions, 4 deletions
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,
83 /* Remember the converted mapping table entries */ 83 /* Remember the converted mapping table entries */
84 dt_map = kzalloc(sizeof(*dt_map), GFP_KERNEL); 84 dt_map = kzalloc(sizeof(*dt_map), GFP_KERNEL);
85 if (!dt_map) { 85 if (!dt_map) {
86 dev_err(p->dev, "failed to alloc struct pinctrl_dt_map\n");
87 dt_free_map(pctldev, map, num_maps); 86 dt_free_map(pctldev, map, num_maps);
88 return -ENOMEM; 87 return -ENOMEM;
89 } 88 }
@@ -158,10 +157,8 @@ static int dt_remember_dummy_state(struct pinctrl *p, const char *statename)
158 struct pinctrl_map *map; 157 struct pinctrl_map *map;
159 158
160 map = kzalloc(sizeof(*map), GFP_KERNEL); 159 map = kzalloc(sizeof(*map), GFP_KERNEL);
161 if (!map) { 160 if (!map)
162 dev_err(p->dev, "failed to alloc struct pinctrl_map\n");
163 return -ENOMEM; 161 return -ENOMEM;
164 }
165 162
166 /* There is no pctldev for PIN_MAP_TYPE_DUMMY_STATE */ 163 /* There is no pctldev for PIN_MAP_TYPE_DUMMY_STATE */
167 map->type = PIN_MAP_TYPE_DUMMY_STATE; 164 map->type = PIN_MAP_TYPE_DUMMY_STATE;