From patchwork Mon Oct 10 15:09:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 118752 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 94075B70FE for ; Tue, 11 Oct 2011 02:10:45 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750804Ab1JJPKo (ORCPT ); Mon, 10 Oct 2011 11:10:44 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:45099 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750786Ab1JJPKo (ORCPT ); Mon, 10 Oct 2011 11:10:44 -0400 Received: (qmail 26679 invoked from network); 10 Oct 2011 15:10:46 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 10 Oct 2011 15:10:46 -0000 To: linux-ide@vger.kernel.org, jgarzik@pobox.com Subject: [PATCH] pata_at91: call clk_put() on ata_host_activate() failure Content-Disposition: inline From: Sergei Shtylyov Organization: MontaVista Software Inc. Date: Mon, 10 Oct 2011 19:09:17 +0400 MIME-Version: 1.0 Message-Id: <201110101909.17566.sshtylyov@ru.mvista.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org pata_at91_probe() forgets to call clk_put() iff ata_host_activate() fails... Signed-off-by: Sergei Shtylyov --- This patch is against the recent Linus' tree. drivers/ata/pata_at91.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 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/pata_at91.c =================================================================== --- linux-2.6.orig/drivers/ata/pata_at91.c +++ linux-2.6/drivers/ata/pata_at91.c @@ -414,10 +414,13 @@ static int __devinit pata_at91_probe(str host->private_data = info; - return ata_host_activate(host, irq ? gpio_to_irq(irq) : 0, + ret = ata_host_activate(host, irq ? gpio_to_irq(irq) : 0, irq ? ata_sff_interrupt : NULL, irq_flags, &pata_at91_sht); + if (!ret) + return 0; + err_put: clk_put(info->mck); return ret;