lkml.org 
[lkml]   [2006]   [Jan]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 10 Jan 2006 02:09:50 -0500
FromDmitry Torokhov <>
Subject[PATCH 5/5] ibmasm: fix input initialization error path
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@us.ibm.com>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-10 08:23    [from the cache]
©2003-2008