diff options
author | Andres Salomon <dilinger@queued.net> | 2008-01-17 12:01:51 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-01-17 12:01:51 -0500 |
commit | 653e91d01fa4d39d2ed06a8c2096fef08b00ee7e (patch) | |
tree | 187406751d0a2a440a1735cc24b6e9e2b605c35f | |
parent | 746b31a9d4e08240d267069bcf5084eb7e427ad7 (diff) |
Input: psmouse - fix input_dev leak in lifebook driver
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>
-rw-r--r-- | drivers/input/mouse/lifebook.c | 7 |
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 | |||
225 | 225 | ||
226 | static void lifebook_disconnect(struct psmouse *psmouse) | 226 | static void lifebook_disconnect(struct psmouse *psmouse) |
227 | { | 227 | { |
228 | struct lifebook_data *priv = psmouse->private; | ||
229 | |||
228 | psmouse_reset(psmouse); | 230 | psmouse_reset(psmouse); |
229 | kfree(psmouse->private); | 231 | if (priv) { |
232 | input_unregister_device(priv->dev2); | ||
233 | kfree(priv); | ||
234 | } | ||
230 | psmouse->private = NULL; | 235 | psmouse->private = NULL; |
231 | } | 236 | } |
232 | 237 | ||