From patchwork Sun Apr 17 02:02:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 91526 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pz0-f56.google.com (mail-pz0-f56.google.com [209.85.210.56]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id C05E6B700A for ; Sun, 17 Apr 2011 12:03:11 +1000 (EST) Received: by pzk33 with SMTP id 33sf1322713pzk.11 for ; Sat, 16 Apr 2011 19:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:subject:from:to:cc :date:message-id:mime-version:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=KYyhSH7gkmKyRXUWvsl2smEruD58ETai0+vkzKIIpRg=; b=REMf8FA3XKOVKypmNTJK35Oj3sbOe5yeo6UWm6m0unEE3wnJIs+1ron+mhnsTw/a9/ T9qXMjr5vpRFa4psZvaPNKydzWWs7hI3V2sIV0nc8eSK+51V7pOIvEbTsZCEFFlDohCI 06CTK8IVG0RBcjl0dWj8wQHxTUy8si9F/C4EM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:subject:from:to:cc:date:message-id :mime-version:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; b=vxCLCIaTFKiZf84ca4vYQnt2KL7CPVNE1C1AeHRP+D9jNAA2ONWm7e+yW+dKKQeHcU jKt0Oy+c5zqK+eAQ9d2YkUe3XBIEKGmq/JriMqwzEarLYKkBe7ZlMQaHMvL0fBW8nLFM XMGSq0RQrly4UZuU5k3GKw4B0w0pug8lRi72w= Received: by 10.142.152.21 with SMTP id z21mr379548wfd.0.1303005787950; Sat, 16 Apr 2011 19:03:07 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.143.87.9 with SMTP id p9ls1036220wfl.3.gmail; Sat, 16 Apr 2011 19:03:06 -0700 (PDT) Received: by 10.142.247.14 with SMTP id u14mr1712235wfh.31.1303005786554; Sat, 16 Apr 2011 19:03:06 -0700 (PDT) Received: by 10.142.247.14 with SMTP id u14mr1712233wfh.31.1303005786525; Sat, 16 Apr 2011 19:03:06 -0700 (PDT) Received: from mail-px0-f178.google.com (mail-px0-f178.google.com [209.85.212.178]) by gmr-mx.google.com with ESMTPS id u26si3012440wfc.5.2011.04.16.19.03.06 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 16 Apr 2011 19:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of axel.lin@gmail.com designates 209.85.212.178 as permitted sender) client-ip=209.85.212.178; Received: by pxi1 with SMTP id 1so3060902pxi.37 for ; Sat, 16 Apr 2011 19:03:06 -0700 (PDT) Received: by 10.68.66.162 with SMTP id g2mr4537346pbt.391.1303005786367; Sat, 16 Apr 2011 19:03:06 -0700 (PDT) Received: from [59.112.85.198] (59-112-85-198.dynamic.hinet.net [59.112.85.198]) by mx.google.com with ESMTPS id d9sm1384755pba.16.2011.04.16.19.03.03 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 16 Apr 2011 19:03:05 -0700 (PDT) Subject: [rtc-linux] [PATCH] RTC: rtc-omap: fix a leak of the IRQ during init failure From: Axel Lin To: linux-kernel@vger.kernel.org Cc: "George G. Davis" , Alessandro Zummo , Ingo Molnar , rtc-linux@googlegroups.com Date: Sun, 17 Apr 2011 10:02:58 +0800 Message-ID: <1303005778.2889.2.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-Original-Sender: axel.lin@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of axel.lin@gmail.com designates 209.85.212.178 as permitted sender) smtp.mail=axel.lin@gmail.com; dkim=pass (test mode) header.i=@gmail.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , In omap_rtc_probe error path, free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Axel Lin --- drivers/rtc/rtc-omap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index de0dd7b..bcae8dd 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -394,7 +394,7 @@ static int __init omap_rtc_probe(struct platform_device *pdev) return 0; fail2: - free_irq(omap_rtc_timer, NULL); + free_irq(omap_rtc_timer, rtc); fail1: rtc_device_unregister(rtc); fail0: