diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-03-27 23:22:13 +0300 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-05-05 20:02:35 -0700 |
commit | 81a08382aeb802ad642ab7f2a7786baa7bafaaa3 (patch) | |
tree | 50e619b0f36c3a0f41e8d2019adc8d7099161a5d /drivers/power/isp1704_charger.c | |
parent | 13f2483cd5e3df425cfa492cc62cf8fada5d01b9 (diff) |
isp1704_charger: Use after free on probe error
We can't use "isp" after freeing it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/isp1704_charger.c')
-rw-r--r-- | drivers/power/isp1704_charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c index 39eb50f35f09..e5ccd2979773 100644 --- a/drivers/power/isp1704_charger.c +++ b/drivers/power/isp1704_charger.c @@ -474,13 +474,13 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev) fail2: power_supply_unregister(&isp->psy); fail1: + isp1704_charger_set_power(isp, 0); usb_put_transceiver(isp->phy); fail0: kfree(isp); dev_err(&pdev->dev, "failed to register isp1704 with error %d\n", ret); - isp1704_charger_set_power(isp, 0); return ret; } |