From patchwork Thu Apr 28 03:57:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 738291 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3S3vpOk002580 for ; Thu, 28 Apr 2011 03:57:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754930Ab1D1D5a (ORCPT ); Wed, 27 Apr 2011 23:57:30 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:49665 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754154Ab1D1D5a (ORCPT ); Wed, 27 Apr 2011 23:57:30 -0400 Received: by gyd10 with SMTP id 10so840525gyd.19 for ; Wed, 27 Apr 2011 20:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=n086xWw3DC4ZUQXE/Co1XfkDJcfG6EctWx7/yGJLCBw=; b=PClFXRQ2PjnPzqOxQLwBYDEA0kdTw6YKx33HR2x/4gvIoIJjzwmFzhvV0wegNBJttI TBq74zIi4e0+5XrpipK0U1plSVxfedjAHhUM8tGQo/G+G1LWW6NRrqGSjaN50bWMWhJR aK3pE0vNcsY7GPBc+0Z96n/en9jngCOSpnhwA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=YU/BRx+WMNLFILi10QxTmzVBXOiflaxEMUrSbKOAzDnZGAWxFQNgwP5aWnh+/neAd3 ZtA/ta8+Dex0FhdsOTaPqzIxF/CLiPtmA6u3aBLDTYMS7Z234jRJvXxf+Vx7XLC+F0My 4chBMN0VY6WDTfhyUY6vq8JagW7ywEah548Nw= Received: by 10.91.42.15 with SMTP id u15mr2587541agj.161.1303963049303; Wed, 27 Apr 2011 20:57:29 -0700 (PDT) Received: from [59.112.83.46] (59-112-83-46.dynamic.hinet.net [59.112.83.46]) by mx.google.com with ESMTPS id d20sm1398291ang.43.2011.04.27.20.57.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2011 20:57:28 -0700 (PDT) Subject: [PATCH] Input: twl4030-pwrbutton - fix a leak of the IRQ during init failure From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Peter De Schrijver , Felipe Balbi , Dmitry Torokhov , linux-input@vger.kernel.org Date: Thu, 28 Apr 2011 11:57:21 +0800 Message-ID: <1303963041.2588.3.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Apr 2011 03:57:51 +0000 (UTC) In twl4030_pwrbutton_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/input/misc/twl4030-pwrbutton.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index f16972b..38e4b50 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -89,7 +89,7 @@ static int __init twl4030_pwrbutton_probe(struct platform_device *pdev) return 0; free_irq: - free_irq(irq, NULL); + free_irq(irq, pwr); free_input_dev: input_free_device(pwr); return err;