diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-09-27 17:13:55 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-09-27 17:32:34 -0700 |
commit | 1a5e251996e1b602f2ddc9261ee9de0ca1875bfa (patch) | |
tree | c9e90c6c08918cfb85965b61dbbfa66dd78b7a0d /drivers/input/serio | |
parent | 72d4736253af74147b1fa68145b2f4c61d1f37e1 (diff) | |
download | op-kernel-dev-1a5e251996e1b602f2ddc9261ee9de0ca1875bfa.zip op-kernel-dev-1a5e251996e1b602f2ddc9261ee9de0ca1875bfa.tar.gz |
Input: serio - fix blocking of parport
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>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/parkbd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c index 26b4593..1e8cd6f 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; } |