Skip to contentSkip to conversation

pinctrl/pinctrl-u300: remove devm_kfree at driver unload

PATCH Applied Devendra Naga 2 participants 2 messages Jun 16, 2012 – Jun 18, 2012 Pin control

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl/pinctrl-u300: remove devm_kfree at driver unload

the memory allocated by devm_kzalloc is automatically freed at the driver detach side, so no neeed of calling devm_kfree

---
 drivers/pinctrl/pinctrl-u300.c |    1 -
 1 file changed, 1 deletion(-)
drivers/pinctrl/pinctrl-u300.c +0 -1
index 05d0299..13e7a3e 100644
@@ -1183,7 +1183,6 @@ static int __devexit u300_pmx_remove(struct platform_device *pdev)
 	iounmap(upmx->virtbase);
 	release_mem_region(upmx->phybase, upmx->physize);
 	platform_set_drvdata(pdev, NULL);
-	devm_kfree(&pdev->dev, upmx);
 
 	return 0;
 }
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 5 lines · Devendra Naga

the memory allocated by devm_kzalloc is automatically freed at the driver detach side, so no neeed of calling devm_kfree

Applied, thanks!
Linus Walleij