Skip to contentSkip to conversation

pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs()

PATCH In review SF Markus Elfring 2 participants 2 messages Dec 25, 2017 – Jan 2, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs()

From: Markus Elfring <[email protected]>
Date: Mon, 25 Dec 2017 20:04:05 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/pinctrl/pinctrl-utils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pinctrl/pinctrl-utils.c +1 -3
index 9189fbafb102..f2bcbf62c03d 100644
@@ -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;
Signature · 1 line
2.15.1