lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 29 Jul 2012 23:31:39 +0545
From:	Devendra Naga <develkernel412222@...il.com>
To:	Anton Vorontsov <cbou@...l.ru>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-kernel@...r.kernel.org
Cc:	Devendra Naga <develkernel412222@...il.com>
Subject: [PATCH 1/2] lp8727_charger: free_irq when lp8727_register_psy fail

actually the driver does a request_threaded_irq and after this it calls
lp8727_register_psy, and if it fails it doesn't free the irqs that it
registered to

Signed-off-by: Devendra Naga <develkernel412222@...il.com>
---
 drivers/power/lp8727_charger.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/power/lp8727_charger.c b/drivers/power/lp8727_charger.c
index d8b7578..699f0ef 100644
--- a/drivers/power/lp8727_charger.c
+++ b/drivers/power/lp8727_charger.c
@@ -454,11 +454,13 @@ static int lp8727_probe(struct i2c_client *cl, const struct i2c_device_id *id)
 	ret = lp8727_register_psy(pchg);
 	if (ret) {
 		dev_err(pchg->dev, "power supplies register err: %d", ret);
-		goto error;
+		goto error_irq;
 	}
 
 	return 0;
 
+error_irq:
+	free_irq(pchg->client->irq, pchg);
 error:
 	kfree(pchg);
 	return ret;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists