From patchwork Mon Feb 20 20:42:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 6839 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6547E23E48 for ; Mon, 20 Feb 2012 20:42:18 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 23C6EA184C9 for ; Mon, 20 Feb 2012 20:42:18 +0000 (UTC) Received: by iabz7 with SMTP id z7so11165182iab.11 for ; Mon, 20 Feb 2012 12:42:17 -0800 (PST) Received: from mr.google.com ([10.42.131.129]) by 10.42.131.129 with SMTP id z1mr23377224ics.53.1329770537561 (num_hops = 1); Mon, 20 Feb 2012 12:42:17 -0800 (PST) Received: by 10.42.131.129 with SMTP id z1mr18693223ics.53.1329770537507; Mon, 20 Feb 2012 12:42:17 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.11.10 with SMTP id r10csp59242ibr; Mon, 20 Feb 2012 12:42:16 -0800 (PST) Received: by 10.213.17.19 with SMTP id q19mr2279458eba.85.1329770535627; Mon, 20 Feb 2012 12:42:15 -0800 (PST) Received: from eu1sys200aog105.obsmtp.com (eu1sys200aog105.obsmtp.com. [207.126.144.119]) by mx.google.com with SMTP id e46si303911eeo.175.2012.02.20.12.42.10 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Feb 2012 12:42:15 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.119; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKT0KwIllc1MT3pMBTCsekdZg6THVGd7Ok@postini.com; Mon, 20 Feb 2012 20:42:15 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CFAAA101; Mon, 20 Feb 2012 20:42:06 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 88A602917; Mon, 20 Feb 2012 20:42:06 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 38A7724C075; Mon, 20 Feb 2012 21:41:56 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 20 Feb 2012 21:42:05 +0100 From: Linus Walleij To: Samuel Ortiz , Cc: Linus Walleij , Mark Brown , Maxime Coquelin , Alex Macro , Michel Jaouen Subject: [PATCH 1/4 v2] mfd/ab8500: fix error path bug Date: Mon, 20 Feb 2012 21:42:03 +0100 Message-ID: <1329770523-9490-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.8 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlTEq/VSRPaZoauhR7Jbsp8HM62bozNY/YNuYPdoRaOSuDflZ05c9IXVsTVXxqqyyiN5cQc From: Linus Walleij We were not freeing the irq properly in the error path in the AB8500 driver. Cc: Mark Brown Signed-off-by: Maxime Coquelin Signed-off-by: Alex Macro Signed-off-by: Michel Jaouen Signed-off-by: Linus Walleij --- 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; }