projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
746b31a
)
Input: psmouse - fix input_dev leak in lifebook driver
author
Andres Salomon
<dilinger@queued.net>
Thu, 17 Jan 2008 17:01:51 +0000
(12:01 -0500)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Thu, 17 Jan 2008 17:01:51 +0000
(12:01 -0500)
The lifebook driver may register a second input device, but it never
unregisters it. This fixes that.
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/mouse/lifebook.c
patch
|
blob
|
history
diff --git
a/drivers/input/mouse/lifebook.c
b/drivers/input/mouse/lifebook.c
index 9ec57d80186e43b7f776ec3b9aed0c7c385ce625..df81b0aaa9f88911fa335d506f284161c5e24d70 100644
(file)
--- a/
drivers/input/mouse/lifebook.c
+++ b/
drivers/input/mouse/lifebook.c
@@
-225,8
+225,13
@@
static void lifebook_set_resolution(struct psmouse *psmouse, unsigned int resolu
static void lifebook_disconnect(struct psmouse *psmouse)
{
+ struct lifebook_data *priv = psmouse->private;
+
psmouse_reset(psmouse);
- kfree(psmouse->private);
+ if (priv) {
+ input_unregister_device(priv->dev2);
+ kfree(priv);
+ }
psmouse->private = NULL;
}