linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] power: ipaq-micro-battery: freeing the wrong variable
@ 2016-03-18  9:00 Dan Carpenter
  2016-04-10 16:27 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-03-18  9:00 UTC (permalink / raw)
  To: Sebastian Reichel, Krzysztof Kozlowski
  Cc: Dmitry Eremin-Solenikov, David Woodhouse, linux-pm, linux-kernel,
	kernel-janitors

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>

diff --git a/drivers/power/ipaq_micro_battery.c b/drivers/power/ipaq_micro_battery.c
index 3f314b1..35b01c7 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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] power: ipaq-micro-battery: freeing the wrong variable
  2016-03-18  9:00 [patch] power: ipaq-micro-battery: freeing the wrong variable Dan Carpenter
@ 2016-04-10 16:27 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2016-04-10 16:27 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Krzysztof Kozlowski, Dmitry Eremin-Solenikov, David Woodhouse,
	linux-pm, linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

Hi,

On Fri, Mar 18, 2016 at 12:00:51PM +0300, Dan Carpenter wrote:
> We accidentally free "micro_ac_power" which is an error pointer and it
> leads to an oops.  We intended to free "micro_batt_power".

Thanks, queued.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-10 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18  9:00 [patch] power: ipaq-micro-battery: freeing the wrong variable Dan Carpenter
2016-04-10 16:27 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).