diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2006-03-30 18:47:32 +0200 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-03-30 19:48:59 +0200 |
commit | cd7a9202a5a6e7712df2b80ed5ebd7b078130fc3 (patch) | |
tree | c7e2504dd6de0d2412815dce658468f7add77173 /drivers/input/keyboard/hilkbd.c | |
parent | [PARISC] Add atomic_sub_and_test (diff) | |
download | linux-cd7a9202a5a6e7712df2b80ed5ebd7b078130fc3.tar.xz linux-cd7a9202a5a6e7712df2b80ed5ebd7b078130fc3.zip |
[PARISC] Fix double free when removing HIL drivers
On Thu, Mar 30, 2006 at 08:31:02AM -0500, Dmitry Torokhov wrote:
> Don't do that, its double free. input_unregister_device() normally
> causes release() to be called and free the device. input_free_device
> is only to be called when input_register_device has not been called or
> failed.
>
> Plus you might want to unregister device after closing serio port,
> otherwise your interrupt routine might be referencing already freed
> memory.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers/input/keyboard/hilkbd.c')
-rw-r--r-- | drivers/input/keyboard/hilkbd.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c index 452c5f3e6129..33edd030aa75 100644 --- a/drivers/input/keyboard/hilkbd.c +++ b/drivers/input/keyboard/hilkbd.c @@ -334,7 +334,6 @@ static void __exit hil_exit(void) input_unregister_device(hil_dev.dev); - input_free_device(hil_dev.dev); hil_dev.dev = NULL; #if defined(CONFIG_PARISC) |