diff mbox

Input: rpckbd - fix a leak of the IRQ during init failure

Message ID 1301794866.3657.1.camel@phoenix (mailing list archive)
State Accepted
Commit e28e1d93e9591d21e440f5210a9b4317c59445df
Headers show

Commit Message

axel lin April 3, 2011, 1:41 a.m. 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 <axel.lin@gmail.com>
---
 drivers/input/serio/rpckbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Dmitry Torokhov April 3, 2011, 4:20 a.m. UTC | #1
On Sun, Apr 03, 2011 at 09:41:06AM +0800, Axel Lin wrote:
> 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 <axel.lin@gmail.com>

Applied, thanks Axel.
diff mbox

Patch

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;
 	}