From patchwork Sun May 1 16:13:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 746142 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 p41GE1lA004737 for ; Sun, 1 May 2011 16:14:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305Ab1EAQNk (ORCPT ); Sun, 1 May 2011 12:13:40 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:56724 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752739Ab1EAQNj (ORCPT ); Sun, 1 May 2011 12:13:39 -0400 Received: by pwi15 with SMTP id 15so2386648pwi.19 for ; Sun, 01 May 2011 09:13:38 -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=RtggyhWgZfr49XWYrFRU5wR/igQDWt/muuIrcqpsW2U=; b=p067oFqy1IwhWuNkYESkc2sRaceWPWQZTAQAgQIPrv/DPLFmv+QkTah35Z+FQvNky2 7JY5i0IqKEzyDH0hOQ+NxCMVL4zoa/M+u35ww0dpde3FZpJeEL+G4vzgCM13KgWvxIbK Kp3gpVGZuKtQmdX62VkhW1iLyuFeZve4fWegc= 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=LbfW3zd4jjlbGjP+mGCV0FWJrTiz60kDJkoHAVQnpr/mJxiFElkC4UMIsbSE8WUpJZ uCHi5gPeE41YnY0LUlFbWB0WhMIrKQIsgA7TqUWTSwfMguZuQPx0yqBVn4SXLZ4PD7Wx iAUJ9gjoMNh9hf+ZXulEVFXdB0Fpkj/atzbJE= Received: by 10.68.7.132 with SMTP id j4mr7875902pba.463.1304266418742; Sun, 01 May 2011 09:13:38 -0700 (PDT) Received: from [218.167.74.49] (218-167-74-49.dynamic.hinet.net [218.167.74.49]) by mx.google.com with ESMTPS id f3sm3208105pbq.58.2011.05.01.09.13.36 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 May 2011 09:13:38 -0700 (PDT) Subject: [PATCH] Input: h3600_ts: fix a leak of the IRQ during init failure From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Dmitry Torokhov , linux-input@vger.kernel.org Date: Mon, 02 May 2011 00:13:32 +0800 Message-ID: <1304266412.3000.4.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]); Sun, 01 May 2011 16:14:01 +0000 (UTC) In h3600ts_connect error path, free_irq() was using ts->dev rather than the &ts->dev as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Axel Lin --- drivers/input/touchscreen/h3600_ts_input.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c index 45f93d0..e45ae38 100644 --- a/drivers/input/touchscreen/h3600_ts_input.c +++ b/drivers/input/touchscreen/h3600_ts_input.c @@ -424,8 +424,8 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) fail4: serio_close(serio); fail3: serio_set_drvdata(serio, NULL); - free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts->dev); -fail2: free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts->dev); + free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, &ts->dev); +fail2: free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, &ts->dev); fail1: input_free_device(input_dev); kfree(ts); return err;