From patchwork Sun Apr 3 01:41:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 683961 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 p331fFqb029263 for ; Sun, 3 Apr 2011 01:41:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123Ab1DCBlO (ORCPT ); Sat, 2 Apr 2011 21:41:14 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:36045 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751909Ab1DCBlO (ORCPT ); Sat, 2 Apr 2011 21:41:14 -0400 Received: by iwn34 with SMTP id 34so4659922iwn.19 for ; Sat, 02 Apr 2011 18:41:13 -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=y9ZBHaeaSNxDageJTkN16An5U8J4ppsCuGv0AsYEdag=; b=YIQ0j15d34bnmKfxj0hvxmHFu1Uud9o2tT3CfBuMBNVtQsbF6Rp0KIdpreygFtNl6a Ta9NBt9nBHtGMK2k9N3yZ4uB3s/bo337XkRSfe/iHwWPeiyNAn2uGwuK9E93tBwDkZvP Rlf2x9ATNy+eELw74BHFo8y6C6fbqeWVvlsro= 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=ARcr2DWb2GzN4E8RMbVp0vuyJ4vS/NNAKXur8tD2mfry+nJWhwIg77YvLOXk3XGaG/ XWYK04BFFGFvMZ2GKCUS16hU5r2zgpacfnNcuzZ7Hk+1qh9SFMF2B4bYZcwbXPMd2IPf GPf6FNxGRaw3c4hAAI4bKKsdEvWVXUEe/eGYU= Received: by 10.231.150.205 with SMTP id z13mr5482503ibv.177.1301794873555; Sat, 02 Apr 2011 18:41:13 -0700 (PDT) Received: from [59.112.86.64] (59-112-86-64.dynamic.hinet.net [59.112.86.64]) by mx.google.com with ESMTPS id o3sm2601980ibd.61.2011.04.02.18.41.11 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 02 Apr 2011 18:41:12 -0700 (PDT) Subject: [PATCH] Input: rpckbd - 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: Sun, 03 Apr 2011 09:41:06 +0800 Message-ID: <1301794866.3657.1.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, 03 Apr 2011 01:41:15 +0000 (UTC) In rpckbd_open prror 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/serio/rpckbd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index 9da6fbc..7ec3c97 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c @@ -90,7 +90,7 @@ static int rpckbd_open(struct serio *port) if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) { printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n"); - free_irq(IRQ_KEYBOARDRX, NULL); + free_irq(IRQ_KEYBOARDRX, port); return -EBUSY; }