[PATCH 5/5] ibmasm: fix input initialization error path

From: Dmitry Torokhov
Date: Tue Jan 10 2006 - 02:20:01 EST


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 <vernux@xxxxxxxxxx>

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
---

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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/