pinctrl: double free on error path in pinctrl_register()
Subsystems (2)
PATCH 1/1 pinctrl: double free on error path in pinctrl_register()
This is duplicated in the error handling after we go to out_err.
Signed-off-by Dan Carpenter <[email protected]>
drivers/pinctrl/core.c +0 -2
@@ -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);
Quoted 3 lines · Dan Carpenter
This is duplicated in the error handling after we go to
out_err.Signed-off-by Dan Carpenter <[email protected]>
This got fixed by Axel Lin's patch that arrived just a little bit before this one,
but thanks anyway!
Yours,
Linus Walleij