summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/lifebook.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-18 02:50:19 +0300
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-18 02:50:19 +0300
commit03bbe082cffc4533f6557bf23f0c672307067246 (patch)
treee2a7e14d96eb0b4a2ef2841defd18267d3c8af10 /drivers/input/mouse/lifebook.c
parent30472908d50cf726a68c2b444127a1dafae8a91c (diff)
parentfb49161027e1938c34fc97d1136735e1d4209df6 (diff)
downloadlinux-03bbe082cffc4533f6557bf23f0c672307067246.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ALPS - fix sync loss on Acer Aspire 5720ZG Input: psmouse - fix input_dev leak in lifebook driver Input: psmouse - fix potential memory leak in psmouse_connect() Input: usbtouchscreen - fix buffer overflow, make more egalax work Input: mousedev - handle mice that use absolute coordinates
Diffstat (limited to 'drivers/input/mouse/lifebook.c')
-rw-r--r--drivers/input/mouse/lifebook.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c
index 9ec57d80186e..df81b0aaa9f8 100644
--- 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;
}