diff mbox

pinctrl-sirf: remove devm_kfree at error path

Message ID 1343549498-2217-1-git-send-email-develkernel412222@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Devendra Naga July 29, 2012, 8:11 a.m. UTC
the pointers that are allocated with devm_kzalloc will be automatically freed,
at unload time.

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

Comments

Linus Walleij Aug. 7, 2012, 12:21 p.m. UTC | #1
On Sun, Jul 29, 2012 at 10:11 AM, Devendra Naga
<develkernel412222@gmail.com> wrote:

> the pointers that are allocated with devm_kzalloc will be automatically freed,
> at unload time.
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>

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

Yours,
Linus Walleij
diff mbox

Patch

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;
 }