mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pinctrl/pinctrl-u300: remove devm_kfree at driver unload
@ 2012-06-16 17:45 Devendra Naga
  2012-06-18  6:07 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Devendra Naga @ 2012-06-16 17:45 UTC (permalink / raw)
  To: Linus Walleij, linux-kernel; +Cc: Devendra Naga

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

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 drivers/pinctrl/pinctrl-u300.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c
index 05d0299..13e7a3e 100644
--- a/drivers/pinctrl/pinctrl-u300.c
+++ b/drivers/pinctrl/pinctrl-u300.c
@@ -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;
 }
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl/pinctrl-u300: remove devm_kfree at driver unload
  2012-06-16 17:45 [PATCH] pinctrl/pinctrl-u300: remove devm_kfree at driver unload Devendra Naga
@ 2012-06-18  6:07 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2012-06-18  6:07 UTC (permalink / raw)
  To: Devendra Naga; +Cc: linux-kernel

On Sat, Jun 16, 2012 at 7:45 PM, Devendra Naga <devendra.aaru@gmail.com> wrote:

> the memory allocated by devm_kzalloc is automatically
> freed at the driver detach side, so no neeed of calling
> devm_kfree
>
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>

Applied, thanks!
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-18  6:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-16 17:45 [PATCH] pinctrl/pinctrl-u300: remove devm_kfree at driver unload Devendra Naga
2012-06-18  6:07 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome