From patchwork Fri Oct 7 15:22:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 118333 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id AAE75B70C0 for ; Sat, 8 Oct 2011 02:30:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752992Ab1JGPai (ORCPT ); Fri, 7 Oct 2011 11:30:38 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:55925 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752781Ab1JGPai (ORCPT ); Fri, 7 Oct 2011 11:30:38 -0400 X-Greylist: delayed 401 seconds by postgrey-1.27 at vger.kernel.org; Fri, 07 Oct 2011 11:30:37 EDT Received: (qmail 30423 invoked from network); 7 Oct 2011 15:24:00 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 7 Oct 2011 15:24:00 -0000 To: linux-ide@vger.kernel.org, jgarzik@pobox.com Subject: [PATCH 1/2] sata_mv: release clock on ata_host_activate() failure Content-Disposition: inline From: Sergei Shtylyov Organization: MontaVista Software Inc. Date: Fri, 7 Oct 2011 19:22:33 +0400 MIME-Version: 1.0 Message-Id: <201110071922.33410.sshtylyov@ru.mvista.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org mv_platfrom_probe() forgets to call clk_disable() and clk_put() iff ata_host_activate() fails... Signed-off-by: Sergei Shtylyov --- drivers/ata/sata_mv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/ata/sata_mv.c =================================================================== --- linux-2.6.orig/drivers/ata/sata_mv.c +++ linux-2.6/drivers/ata/sata_mv.c @@ -4087,8 +4087,11 @@ static int mv_platform_probe(struct plat dev_info(&pdev->dev, "slots %u ports %d\n", (unsigned)MV_MAX_Q_DEPTH, host->n_ports); - return ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt, - IRQF_SHARED, &mv6_sht); + rc = ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt, + IRQF_SHARED, &mv6_sht); + if (!rc) + return 0; + err: #if defined(CONFIG_HAVE_CLK) if (!IS_ERR(hpriv->clk)) {