On Thu, Dec 03, 2009 at 10:58:11AM +0100, Anisse Astier wrote: > Hi Dmitry, > > On Wed, 02 Dec 2009 01:24:25 -0800, Dmitry Torokhov > <dmitry.torokhov@xxxxxxxxx> wrote : > > > diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c > > index c284217..8868610 100644 > > --- a/drivers/platform/x86/hp-wmi.c > > +++ b/drivers/platform/x86/hp-wmi.c > > @@ -411,14 +342,29 @@ static int __init hp_wmi_input_setup(void) > > hp_wmi_tablet_state()); > > input_sync(hp_wmi_input_dev); > > > > - err = input_register_device(hp_wmi_input_dev); > > + err = wmi_install_notify_handler(HPWMI_EVENT_GUID, hp_wmi_notify, NULL); > > + if (err) > > + goto err_free_keymap; > > > > - if (err) { > > - input_free_device(hp_wmi_input_dev); > > - return err; > > - } > > + err = input_register_device(hp_wmi_input_dev); > > + if (err) > > + goto err_uninstall_notifier; > > > > return 0; > > + > > + err_uninstall_notifier: > > + wmi_remove_notify_handler(HPWMI_EVENT_GUID); > > + err_free_keymap: > > + (hp_wmi_input_dev); > > + err_free_dev: > > + input_free_device(hp_wmi_input_dev); > > + return err; > > +} > > + > > +static void __exit hp_wmi_input_destroy(void) > > +{ > > + wmi_remove_notify_handler(HPWMI_EVENT_GUID); > > + input_unregister_device(hp_wmi_input_dev); > > } > I'm not sure if you're calling sparse_keymap_free on the exit path. > Guilty as charged ;) -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html