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>] [day] [month] [year] [list]
Message-ID: <1329770523-9490-1-git-send-email-linus.walleij@stericsson.com>
Date:	Mon, 20 Feb 2012 21:42:03 +0100
From:	Linus Walleij <linus.walleij@...ricsson.com>
To:	Samuel Ortiz <sameo@...ux.intel.com>,
	<linux-kernel@...r.kernel.org>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Maxime Coquelin <maxime.coquelin@...ricsson.com>,
	Alex Macro <alex.macro@...ricsson.com>,
	Michel Jaouen <michel.jaouen@...ricsson.com>
Subject: [PATCH 1/4 v2] mfd/ab8500: fix error path bug

From: Linus Walleij <linus.walleij@...aro.org>

We were not freeing the irq properly in the error path in
the AB8500 driver.

Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@...ricsson.com>
Signed-off-by: Alex Macro <alex.macro@...ricsson.com>
Signed-off-by: Michel Jaouen <michel.jaouen@...ricsson.com>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
ChangeLog v1->v2:
- Make the patch bisectable and isolated the fix after comment
  from Maxime.
---
 drivers/mfd/ab8500-core.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 53e2a80..d295941 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -956,11 +956,12 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
 	return ret;
 
 out_freeirq:
-	if (ab8500->irq_base) {
+	if (ab8500->irq_base)
 		free_irq(ab8500->irq, ab8500);
 out_removeirq:
+	if (ab8500->irq_base)
 		ab8500_irq_remove(ab8500);
-	}
+
 	return ret;
 }
 
-- 
1.7.8

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ