Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] pinctrl/pinctrl-u300: remove devm_kfree at driver unload

30 views
Skip to first unread message

Devendra Naga

unread,
Jun 16, 2012, 1:50:02 PM6/16/12
to
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 <devend...@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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linus Walleij

unread,
Jun 18, 2012, 2:10:01 AM6/18/12
to
On Sat, Jun 16, 2012 at 7:45 PM, Devendra Naga <devend...@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 <devend...@gmail.com>

Applied, thanks!
Linus Walleij
0 new messages