From patchwork Mon Mar 31 17:49:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 3917141 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 CD5879F370 for ; Mon, 31 Mar 2014 17:49:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DBD320380 for ; Mon, 31 Mar 2014 17:49:58 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 19AB220364 for ; Mon, 31 Mar 2014 17:49:57 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUgLJ-0004Nh-0W; Mon, 31 Mar 2014 17:49:53 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUgLG-00024X-NS; Mon, 31 Mar 2014 17:49:50 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUgLD-00023V-38 for linux-arm-kernel@lists.infradead.org; Mon, 31 Mar 2014 17:49:48 +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 <0N3B000KKAU97C40@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 01 Apr 2014 02:49:21 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-cf-5339aaa043b7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id CB.25.28157.0AAA9335; Tue, 01 Apr 2014 02:49:20 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N3B003FXAU73K00@mmp2.samsung.com>; Tue, 01 Apr 2014 02:49:20 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Tejun Heo Subject: [PATCH] pata_arasan_cf: fix ata_host_activate() failure handling Date: Mon, 31 Mar 2014 19:49 +0200 Message-id: <7093981.6c4k98qyGh@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+NgFjrJLMWRmVeSWpSXmKPExsVy+t9jQd0FqyyDDY7ts7bY9Pgaq8WxHY+Y LC7vmsNm0dDdw24xZ8ZmVotfy48yWqy8+JfZgd1j56y77B6bVnWyeZy8cJLFY/OSeo+nP/Yy e3zeJBfAFsVlk5Kak1mWWqRvl8CV8aJ7LmPBQ/aKO4cfsTQwnmbrYuTkkBAwkWjt72KGsMUk LtxbDxTn4hASmM4osfLvHiYIp4VJ4mfnSXaQKjYBK4mJ7asYQWwRAVmJK9MeMoIUMQucZZRY d3I2WJGwgKfErCdbwcayCChJnJo0B8zmFdCU2PfvNdhqUaCaHdtXskHEBSV+TL7HAmIzC8hL 7Ns/lRXC1pJYv/M40wRGvllIymYhKZuFpGwBI/MqRtHUguSC4qT0XCO94sTc4tK8dL3k/NxN jOAAfia9g3FVg8UhRgEORiUeXotyy2Ah1sSy4srcQ4wSHMxKIrxbFwCFeFMSK6tSi/Lji0pz UosPMUpzsCiJ8x5stQ4UEkhPLEnNTk0tSC2CyTJxcEo1MMbO/3LNekPATK65wbO4p8+UkJkV lczBHra9hkGifz/jlV9fLj69IFclKVe7ylRxbvAa24cfb6yoUm/uWPt2572rcbaBWnn8k3f+ u3Dy9Zq9/T6vtDaJbDxRMeVh3LGH59OeLhG9uDWZ+aaJj9Df+sXvO0257BNdQzqXerfnXdD/ 1bM6oEHr9CclluKMREMt5qLiRAAVXYqaXAIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140331_134947_356615_3DF4A4F7 X-CRM114-Status: UNSURE ( 8.27 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.4 (-------) 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=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 --- drivers/ata/pata_arasan_cf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) Index: b/drivers/ata/pata_arasan_cf.c =================================================================== --- a/drivers/ata/pata_arasan_cf.c 2014-03-31 16:57:47.443727785 +0200 +++ b/drivers/ata/pata_arasan_cf.c 2014-03-31 17:09:48.171715498 +0200 @@ -898,9 +898,15 @@ 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) + goto exit_cf; + return 0; + +exit_cf: + cf_exit(acdev); free_clk: clk_put(acdev->clk); return ret;