Skip to content

Commit

Permalink
Input: serio - fix blocking of parport
Browse files Browse the repository at this point in the history
If parkbd_allocate_serio() fails to allocate memory we are releasing the
parport but we missed unregistering the device. As a result this device
with exclusive access to that parport remains registered. And no other
device will be able to use that parport even though this driver has
failed to load.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Sudip Mukherjee authored and Dmitry Torokhov committed Sep 28, 2015
1 parent 72d4736 commit 1a5e251
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/serio/parkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ static int __init parkbd_init(void)
parkbd_port = parkbd_allocate_serio();
if (!parkbd_port) {
parport_release(parkbd_dev);
parport_unregister_device(parkbd_dev);
return -ENOMEM;
}

Expand Down

0 comments on commit 1a5e251

Please sign in to comment.