summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-03-18 12:00:51 +0300
committerSebastian Reichel <sre@kernel.org>2016-04-10 17:19:52 +0200
commitb9223da41794030a5dfd5106c34ed1b98255e2ae (patch)
treeb803ecf366077fb0854542e4f9f99ecca065bd39 /drivers/power
parent1285b0a30d530d0807c229c6aad73ed1966d75ad (diff)
downloadlinux-b9223da41794030a5dfd5106c34ed1b98255e2ae.tar.bz2
power: ipaq-micro-battery: freeing the wrong variable
We accidentally free "micro_ac_power" which is an error pointer and it leads to an oops. We intended to free "micro_batt_power". Fixes: a2c1d531854c ('power_supply: ipaq_micro_battery: Check return values in probe') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/ipaq_micro_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/ipaq_micro_battery.c b/drivers/power/ipaq_micro_battery.c
index 3f314b1a30d7..35b01c7d775b 100644
--- a/drivers/power/ipaq_micro_battery.c
+++ b/drivers/power/ipaq_micro_battery.c
@@ -261,7 +261,7 @@ static int micro_batt_probe(struct platform_device *pdev)
return 0;
ac_err:
- power_supply_unregister(micro_ac_power);
+ power_supply_unregister(micro_batt_power);
batt_err:
cancel_delayed_work_sync(&mb->update);
destroy_workqueue(mb->wq);