aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-09-27 17:13:55 -0700
committerJiri Slaby <jslaby@suse.cz>2015-10-28 16:38:30 +0100
commit0894eb8db1b1f6ab424132ee653bd495581b9af9 (patch)
tree122ee7c84949f8559a0c2642fcfed1a7368937de
parent666e2269eccc2f1a996b6110040f37d45cb76840 (diff)
Input: serio - fix blocking of parport
commit 1a5e251996e1b602f2ddc9261ee9de0ca1875bfa upstream. 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> Cc: Oliver Neukum <ONeukum@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r--drivers/input/serio/parkbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c
index 26b45936f9fd..1e8cd6f1fe9e 100644
--- a/drivers/input/serio/parkbd.c
+++ b/drivers/input/serio/parkbd.c
@@ -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;
}