Skip to contentSkip to conversation

pinctrl: at91: Delete an error message for a failed memory allocation in at91_pinctrl_mux_mask()

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

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

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

From: Markus Elfring <[email protected]>
Date: Sat, 23 Dec 2017 20:44:27 +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-at91.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pinctrl/pinctrl-at91.c +1 -3
index 03492e3c09fa..297f1d161211 100644
@@ -1050,10 +1050,8 @@ static int at91_pinctrl_mux_mask(struct at91_pinctrl *info,
 	info->nmux = size / gpio_banks;
 
 	info->mux_mask = devm_kzalloc(info->dev, sizeof(u32) * size, GFP_KERNEL);
-	if (!info->mux_mask) {
-		dev_err(info->dev, "could not alloc mux_mask\n");
+	if (!info->mux_mask)
 		return -ENOMEM;
-	}
 
 	ret = of_property_read_u32_array(np, "atmel,mux-mask",
 					  info->mux_mask, size);
Signature · 1 line
2.15.1