From patchwork Wed Apr 2 17:19:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 3929931 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 444AA9F2F7 for ; Wed, 2 Apr 2014 17:20:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 662BC20204 for ; Wed, 2 Apr 2014 17:20:37 +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 40D6420200 for ; Wed, 2 Apr 2014 17:20:36 +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 1WVOpy-0000ua-HC; Wed, 02 Apr 2014 17:20:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVOpw-0002qY-5Z; Wed, 02 Apr 2014 17:20:28 +0000 Received: from mail-qc0-x22e.google.com ([2607:f8b0:400d:c01::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVOpt-0002p2-Ab for linux-arm-kernel@lists.infradead.org; Wed, 02 Apr 2014 17:20:26 +0000 Received: by mail-qc0-f174.google.com with SMTP id c9so534115qcz.5 for ; Wed, 02 Apr 2014 10:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=h3MrUJSPNbez4whDep9+8GzMY5p/p1vvl7spgutocdQ=; b=BOqMyksvgL/F/K0O5X1G7NP2YpqNwpDhRKMP4gu2/YLJQve22OIxSCGR58eO57Co6G hIY9N/G9Cp1iT1Ua5xrZs3yEAT7ONui0RkCg2pbZ+X6CrTbFBvkhoU3hvw6qHe/lnSW+ U9E6Zzs0qIO616oBtzrlpVW5jUfQkG39rPdTmgq9BwLVfJrf2W3eSy/lO0fHpMr9lBah AvLzZrYinnGl4OwhAGcSUJw80K6YYc2EyElAmvTN/W3YOhCBIk0qw5u/1tqYvfnaOpWc pX/5gLp1+uY0PnPvHlF3633m/WYWIPsTkiY2eeXjM7u5dJu602DEjhdL2RuIQF/Inygo 3smQ== X-Received: by 10.140.42.136 with SMTP id c8mr2091713qga.24.1396459202529; Wed, 02 Apr 2014 10:20:02 -0700 (PDT) Received: from htj.dyndns.org (207-38-225-25.c3-0.43d-ubr1.qens-43d.ny.cable.rcn.com. [207.38.225.25]) by mx.google.com with ESMTPSA id p68sm3366144qga.18.2014.04.02.10.20.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Apr 2014 10:20:01 -0700 (PDT) Date: Wed, 2 Apr 2014 13:19:59 -0400 From: Tejun Heo To: Bartlomiej Zolnierkiewicz Subject: [PATCH] pata_at91: fix ata_host_activate() failure handling Message-ID: <20140402171959.GK16631@htj.dyndns.org> References: <3354637.ASvWtLs5Rq@amdc1032> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3354637.ASvWtLs5Rq@amdc1032> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140402_132025_425148_EEA28A04 X-CRM114-Status: GOOD ( 13.63 ) X-Spam-Score: -1.9 (-) Cc: Sergei Shtylyov , 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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Applied to libata/for-3.15-fixes. Thanks. ------- 8< ------- From 27aa64b9d1bd0d23fd692c91763a48309b694311 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Mon, 31 Mar 2014 19:51:14 +0200 Add missing clk_put() call to ata_host_activate() failure path. Sergei says, "Hm, I have once fixed that (see that *if* (!ret)) but looks like a later commit 477c87e90853d136b188c50c0e4a93d01cad872e (ARM: at91/pata: use gpio_is_valid to check the gpio) broke it again. :-( Would be good if the changelog did mention that..." Cc: Andrew Victor Cc: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org --- drivers/ata/pata_at91.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index e9c8727..8a66f23 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c @@ -407,12 +407,13 @@ static int pata_at91_probe(struct platform_device *pdev) 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);