aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/lifebook.c
diff options
context:
space:
mode:
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
225 225
226static void lifebook_disconnect(struct psmouse *psmouse) 226static 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