Skip to content

Commit 9b21e72

Browse files
elfringlinusw
authored andcommitted
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent f68f848 commit 9b21e72

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/pinctrl/devicetree.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,
8383
/* Remember the converted mapping table entries */
8484
dt_map = kzalloc(sizeof(*dt_map), GFP_KERNEL);
8585
if (!dt_map) {
86-
dev_err(p->dev, "failed to alloc struct pinctrl_dt_map\n");
8786
dt_free_map(pctldev, map, num_maps);
8887
return -ENOMEM;
8988
}
@@ -158,10 +157,8 @@ static int dt_remember_dummy_state(struct pinctrl *p, const char *statename)
158157
struct pinctrl_map *map;
159158

160159
map = kzalloc(sizeof(*map), GFP_KERNEL);
161-
if (!map) {
162-
dev_err(p->dev, "failed to alloc struct pinctrl_map\n");
160+
if (!map)
163161
return -ENOMEM;
164-
}
165162

166163
/* There is no pctldev for PIN_MAP_TYPE_DUMMY_STATE */
167164
map->type = PIN_MAP_TYPE_DUMMY_STATE;

0 commit comments

Comments
 (0)