* [patch] pinctrl: double free on error path in pinctrl_register()
@ 2011-10-02 20:22 Dan Carpenter
2011-10-03 8:36 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-10-02 20:22 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-kernel, kernel-janitors
This is duplicated in the error handling after we go to out_err.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index f9263b2..8416a59 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -559,8 +559,6 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
ret = device_register(&pctldev->dev);
if (ret != 0) {
pr_err("error in device registration\n");
- put_device(&pctldev->dev);
- kfree(pctldev);
goto out_err;
}
dev_set_drvdata(&pctldev->dev, pctldev);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] pinctrl: double free on error path in pinctrl_register()
2011-10-02 20:22 [patch] pinctrl: double free on error path in pinctrl_register() Dan Carpenter
@ 2011-10-03 8:36 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2011-10-03 8:36 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-kernel, kernel-janitors, Axel Lin
On Sun, Oct 2, 2011 at 10:22 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> This is duplicated in the error handling after we go to out_err.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This got fixed by Axel Lin's patch that arrived just a little bit
before this one,
but thanks anyway!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-03 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-02 20:22 [patch] pinctrl: double free on error path in pinctrl_register() Dan Carpenter
2011-10-03 8:36 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox