projects
/
profile
/
ivi
/
kernel-adaptation-intel-automotive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13f2483
)
isp1704_charger: Use after free on probe error
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 27 Mar 2012 20:22:13 +0000
(23:22 +0300)
committer
Anton Vorontsov
<anton.vorontsov@linaro.org>
Sun, 6 May 2012 03:02:35 +0000
(20:02 -0700)
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>
drivers/power/isp1704_charger.c
patch
|
blob
|
history
diff --git
a/drivers/power/isp1704_charger.c
b/drivers/power/isp1704_charger.c
index
39eb50f
..
e5ccd29
100644
(file)
--- 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;
}