From patchwork Mon Mar 31 17:51:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 3917201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F68ABF540 for ; Mon, 31 Mar 2014 17:52:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86C6120380 for ; Mon, 31 Mar 2014 17:52:08 +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 9AE6E20364 for ; Mon, 31 Mar 2014 17:52:07 +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 1WUgNP-0005Dd-SH; Mon, 31 Mar 2014 17:52:04 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUgNN-0002Cm-Ky; Mon, 31 Mar 2014 17:52:01 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUgNK-0002AK-O8 for linux-arm-kernel@lists.infradead.org; Mon, 31 Mar 2014 17:52:00 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N3B00IC1AXZU840@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 01 Apr 2014 02:51:35 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-9e-5339ab273e08 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F4.55.28157.72BA9335; Tue, 01 Apr 2014 02:51:35 +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 <0N3B003WHAXY3K00@mmp2.samsung.com>; Tue, 01 Apr 2014 02:51:35 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Tejun Heo Subject: [PATCH] pata_at91: fix ata_host_activate() failure handling Date: Mon, 31 Mar 2014 19:51:14 +0200 Message-id: <3354637.ASvWtLs5Rq@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+NgFjrOLMWRmVeSWpSXmKPExsVy+t9jQV311ZbBBs/2K1lsenyN1eLYjkdM Fpd3zWGzWL7iKbPFt8vN7BbrHr5gsvi1/CijA7vHgl9bWTxeXbjD4rFpVSebx+Yl9R4Tb09j 8fi8SS6ALYrLJiU1J7MstUjfLoEr49jM2YwF7ZwVt/93szcwXmXvYuTgkBAwkeh/L9nFyAlk iklcuLeerYuRi0NIYDqjxP1nvawQTguTxILZO5hBqtgErCQmtq9iBLFFBGQlrkx7yAhSxCzw gVHi4YZ1YAlhAReJ7TdvMIHYLAKqEmf/PmAF2cYroCnxtccFJCwq4CmxY/tKNhCbV0BQ4sfk eywgNrOAvMS+/VNZIWwtifU7jzNNYOSbhaRsFpKyWUjKFjAyr2IUTS1ILihOSs810itOzC0u zUvXS87P3cQIDt5n0jsYVzVYHGIU4GBU4uG1KLcMFmJNLCuuzD3EKMHBrCTCu3UBUIg3JbGy KrUoP76oNCe1+BCjNAeLkjjvwVbrQCGB9MSS1OzU1ILUIpgsEwenVAOj124jSxv/Iml36aSy VXXRn74c/lFRtyqkV//V3eJPcjr3T0eY/KpOv9KSmZh3S1tj+wX9N9n7dpydfV8hJS3N5ug7 uV3FOfpnP23c3rhgauS+3nDWj+1XMv6lspn/YClb4Ntd1aoV8lhR9t+zoALd7MuH2HYV+LAc 2bZqPXeErc3aS1bNBw8rsRRnJBpqMRcVJwIAn3s2oFoCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140331_135159_030205_34CFA76F X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.4 (-------) Cc: Nicolas Ferre , linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Jean-Christophe Plagniol-Villard , Andrew Victor , 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_put() call to ata_host_activate() failure path. Cc: Andrew Victor Cc: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_at91.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) Index: b/drivers/ata/pata_at91.c =================================================================== --- a/drivers/ata/pata_at91.c 2014-03-14 16:45:04.196724381 +0100 +++ b/drivers/ata/pata_at91.c 2014-03-31 17:46:40.127677782 +0200 @@ -407,12 +407,13 @@ static int pata_at91_probe(struct platfo host->private_data = info; - return ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0, - gpio_is_valid(irq) ? ata_sff_interrupt : NULL, - irq_flags, &pata_at91_sht); + ret = ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0, + gpio_is_valid(irq) ? ata_sff_interrupt : NULL, + irq_flags, &pata_at91_sht); + if (ret) + goto err_put; - if (!ret) - return 0; + return 0; err_put: clk_put(info->mck);