From patchwork Mon Apr 14 16:01:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 3983381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3E9639F2BA for ; Mon, 14 Apr 2014 16:04:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5D827201BC for ; Mon, 14 Apr 2014 16:04:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91CC8201B4 for ; Mon, 14 Apr 2014 16:04:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WZjKx-0008C7-8D; Mon, 14 Apr 2014 16:02:23 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WZjKu-0007ki-G9 for linux-arm-kernel@lists.infradead.org; Mon, 14 Apr 2014 16:02:20 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4100KHN378PR20@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 01:01:56 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-d6-534c067479b3 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 7B.53.28157.4760C435; Tue, 15 Apr 2014 01:01:56 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N410028M377I760@mmp1.samsung.com>; Tue, 15 Apr 2014 01:01:56 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Tejun Heo Subject: [PATCH v2] pata_arasan_cf: fix ata_host_activate() failure handling Date: Mon, 14 Apr 2014 18:01:47 +0200 Message-id: <1706948.xQXQIMFS2B@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-54-generic-pae; KDE/4.8.5; i686; ; ) MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsVy+t9jAd0SNp9gg+5+TYtNj6+xWhzb8YjJ 4vKuOWwWDd097BZzZmxmtfi1/CijxcqLf5kd2D12zrrL7rFpVSebx8kLJ1k8Ni+p93j6Yy+z x+dNcgFsUVw2Kak5mWWpRfp2CVwZU76vZiz4z17RdHAdSwPjI7YuRg4OCQETiR9LeboYOYFM MYkL99azgdhCAosYJRZ+1uxi5AKyW5gkuu9vZgVJsAlYSUxsX8UIYosIyEpcmfaQEaSIWeAs o8S6k7PZQYYKC/hIHD2kDVLDIqAqsevYC2YQm1dAU2Lj6l1MILaogKfEju0r2SDighI/Jt9j AbGZBeQl9u2fygpha0ms33mcaQIj3ywkZbOQlM1CUraAkXkVo2hqQXJBcVJ6rpFecWJucWle ul5yfu4mRnDoPpPewbiqweIQowAHoxIP74R33sFCrIllxZW5hxglOJiVRHhdtwKFeFMSK6tS i/Lji0pzUosPMUpzsCiJ8x5stQ4UEkhPLEnNTk0tSC2CyTJxcEo1MGadevTTqaY37eq8g0V2 y36+q3xb1B5orfzScIGrtWf7S5GMI6eNpqx0rpm6xe4l70Q3odmfiu+sZV3IOYXJQS9J4K2q 76J5kn55Z/fwyvSFs7+r3snscPz+s7blQjN5eXyb/UrLA+adPCU3Ie5FzqUazpAFU77W/23O UNMu3vvoh89579dv7JRYijMSDbWYi4oTAQOd0z5ZAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140414_090220_674280_E181DFA0 X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.0 (------) Cc: linux-ide@vger.kernel.org, spear-devel@list.st.com, linux-kernel@vger.kernel.org, Shiraz Hashim , Viresh Kumar , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add missing cf_exit() and clk_put() calls to ata_host_activate() failure path. Cc: Viresh Kumar Cc: Shiraz Hashim Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Viresh Kumar --- v2: - re-order code and then drop redundant goto statement drivers/ata/pata_arasan_cf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: b/drivers/ata/pata_arasan_cf.c =================================================================== --- a/drivers/ata/pata_arasan_cf.c 2014-04-14 17:26:27.308294246 +0200 +++ b/drivers/ata/pata_arasan_cf.c 2014-04-14 17:44:41.868314795 +0200 @@ -898,9 +898,12 @@ static int arasan_cf_probe(struct platfo cf_card_detect(acdev, 0); - return ata_host_activate(host, acdev->irq, irq_handler, 0, - &arasan_cf_sht); + ret = ata_host_activate(host, acdev->irq, irq_handler, 0, + &arasan_cf_sht); + if (!ret) + return 0; + cf_exit(acdev); free_clk: clk_put(acdev->clk); return ret;