Input: ibmasm - fix input initialization error path
Do not try to free device that has already been unregistered,
input_unregister_device() frees it automatically.
Spotted by Vernon Mauery <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
---
drivers/misc/ibmasm/remote.c | 1 +
1 files changed, 1 insertion(+)
Index: work/drivers/misc/ibmasm/remote.c
===================================================================
--- work.orig/drivers/misc/ibmasm/remote.c
+++ work/drivers/misc/ibmasm/remote.c
@@ -270,6 +270,7 @@ int ibmasm_init_remote_input_dev(struct
err_unregister_mouse_dev:
input_unregister_device(mouse_dev);
+ mouse_dev = NULL; /* so we don't try to free it again below */
err_free_devices:
input_free_device(mouse_dev);
input_free_device(keybd_dev);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]