forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
746b31a9d4
commit
653e91d01f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user