Skip to content

Commit

Permalink
Input: rpckbd - fix a leak of the IRQ during init failure
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
AxelLin authored and dtor committed Apr 3, 2011
1 parent 26fcd2a commit e28e1d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/serio/rpckbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e28e1d9

Please sign in to comment.