[PATCH] pinctrl-sirf: remove devm_kfree at error path

Subsystems: pin control subsystem, the rest

STALE5143d

2 messages, 2 authors, 2012-08-07 · open the first message on its own page

[PATCH] pinctrl-sirf: remove devm_kfree at error path

From: Devendra Naga <hidden>
Date: 2012-07-29 08:11:50

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

Signed-off-by: Devendra Naga <redacted>
---
 drivers/pinctrl/pinctrl-sirf.c |    1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c
index 2aae8a8..7fca6ce 100644
--- a/drivers/pinctrl/pinctrl-sirf.c
+++ b/drivers/pinctrl/pinctrl-sirf.c
@@ -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;
 }
 
-- 
1.7.9.5

Re: [PATCH] pinctrl-sirf: remove devm_kfree at error path

From: Linus Walleij <hidden>
Date: 2012-08-07 12:21:10

On Sun, Jul 29, 2012 at 10:11 AM, Devendra Naga
[off-list ref] wrote:
the pointers that are allocated with devm_kzalloc will be automatically freed,
at unload time.

Signed-off-by: Devendra Naga <redacted>
Applied, Barry if you don't like this, shout now :-)

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help