Skip to contentSkip to conversation

pinctrl-sirf: remove devm_kfree at error path

PATCH Applied Devendra Naga 2 participants 2 messages Jul 29, 2012 – Aug 7, 2012 Pin control

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl-sirf: remove devm_kfree at error path

the pointers that are allocated with devm_kzalloc will be automatically freed, at unload time.

---
 drivers/pinctrl/pinctrl-sirf.c |    1 -
 1 file changed, 1 deletion(-)
drivers/pinctrl/pinctrl-sirf.c +0 -1
index 2aae8a8..7fca6ce 100644
@@ -1217,7 +1217,6 @@ out_no_rsc_remap:
 	iounmap(spmx->gpio_virtbase);
 out_no_gpio_remap:
 	platform_set_drvdata(pdev, NULL);
-	devm_kfree(&pdev->dev, spmx);
 	return ret;
 }
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 4 lines · Devendra Naga

the pointers that are allocated with devm_kzalloc will be automatically freed, at unload time.

Applied, Barry if you don't like this, shout now :-)

Yours,
Linus Walleij