From patchwork Mon Mar 31 17:52:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 3917231 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 119CF9F2B6 for ; Mon, 31 Mar 2014 17:53:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D4B820380 for ; Mon, 31 Mar 2014 17:53:42 +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 35E7D20364 for ; Mon, 31 Mar 2014 17:53:41 +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 1WUgOt-0005mg-Lw; Mon, 31 Mar 2014 17:53:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUgOr-0002Hy-Bn; Mon, 31 Mar 2014 17:53:33 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUgOn-0002G2-1d for linux-arm-kernel@lists.infradead.org; Mon, 31 Mar 2014 17:53:30 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N3B00H04B0HVJ40@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 01 Apr 2014 02:53:05 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-56-5339ab8118a0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 36.75.28157.18BA9335; Tue, 01 Apr 2014 02:53:05 +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 <0N3B00KIRB0G4Q80@mmp2.samsung.com>; Tue, 01 Apr 2014 02:53:05 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Tejun Heo Subject: [PATCH] pata_samsung_cf: fix ata_host_activate() failure handling Date: Mon, 31 Mar 2014 19:52:44 +0200 Message-id: <6050762.sdUI3gZZlK@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+NgFjrELMWRmVeSWpSXmKPExsVy+t9jQd3G1ZbBBlvnmltMWneAyaJ3wVU2 i02Pr7FaHNvxiMni8q45bBYzzu9jsvi1/CijA7vH31UvmD02repk89i8pN6jb8sqRo/Pm+QC WKO4bFJSczLLUov07RK4Mv5eWsxScI+94k/rSpYGxiNsXYycHBICJhL7Djxnh7DFJC7cWw8U 5+IQEpjOKLFj0h5GCKeFSeLW44mMIFVsAlYSE9tXgdkiArISV6Y9BCtiFjjLKNH8p5O5i5GD Q1jAS+JCezhIDYuAqsShFVvAwrwCmhLbvriChEUFPCV2bF8JdgSvgKDEj8n3WEBsZgF5iX37 p7JC2FoS63ceZ5rAyDcLSdksJGWzkJQtYGRexSiaWpBcUJyUnmukV5yYW1yal66XnJ+7iREc ss+kdzCuarA4xCjAwajEw2tRbhksxJpYVlyZe4hRgoNZSYR36wKgEG9KYmVValF+fFFpTmrx IUZpDhYlcd6DrdaBQgLpiSWp2ampBalFMFkmDk6pBsaqs3YRURN7Fp37ve75RH3eY/+PdV6P ndPgYb+i5GyqtSjP8ZUtVivex1+c9fD/lzlz1At3J26oO/1yiuxlHaPMpjmJ9y9zcj2oDZ4c +PYF89pd5nkMQYvYzHxumn4USOZt1KlJPn9a+u9Wp5Ocyt1vtjvKKb/Uunvl9dKHZqfSzt/p ywjq/tyuxFKckWioxVxUnAgAfwVE01UCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140331_135329_326010_1457338D X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.4 (-------) Cc: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Kukjin Kim , Ben Dooks , 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 clk_disable() call to ata_host_activate() failure path. Cc: Ben Dooks Cc: Kukjin Kim Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Jingoo Han --- drivers/ata/pata_samsung_cf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Index: b/drivers/ata/pata_samsung_cf.c =================================================================== --- a/drivers/ata/pata_samsung_cf.c 2014-03-14 16:45:04.344724378 +0100 +++ b/drivers/ata/pata_samsung_cf.c 2014-03-31 18:31:58.083631437 +0200 @@ -594,9 +594,13 @@ static int __init pata_s3c_probe(struct platform_set_drvdata(pdev, host); - return ata_host_activate(host, info->irq, - info->irq ? pata_s3c_irq : NULL, - 0, &pata_s3c_sht); + ret = ata_host_activate(host, info->irq, + info->irq ? pata_s3c_irq : NULL, + 0, &pata_s3c_sht); + if (ret) + goto stop_clk; + + return 0; stop_clk: clk_disable(info->clk);