linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Anisse Astier <anisse@astier.eu>
Cc: linux-input@vger.kernel.org, linux-acpi@vger.kernel.org,
	Len Brown <lenb@kernel.org>,
	Herton Ronaldo Krzesinski <herton@mandriva.com.br>,
	Harald Welte <laforge@gnumonks.org>,
	Corentin Chary <corentincj@iksaif.net>,
	Carlos Corbacho <carlos@strangeworlds.co.uk>,
	Wu Zhangjin <wuzhangjin@gmail.com>
Subject: Re: [PATCH 4/8] Input: hp-wmi - switch to using sparse keymap library
Date: Thu, 3 Dec 2009 02:03:38 -0800	[thread overview]
Message-ID: <20091203100338.GA32433@core.coreip.homeip.net> (raw)
In-Reply-To: <20091203105811.06571039@destiny.ordissimo>

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@gmail.com> 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

  reply	other threads:[~2009-12-03 10:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02  9:24 [PATCH 0/8] [RFC/RFT] Implement sparse keymap library Dmitry Torokhov
2009-12-02  9:24 ` [PATCH 1/8] Input: add generic support for sparse keymaps Dmitry Torokhov
2009-12-02  9:24 ` [PATCH 2/8] Input: wistron_btns - switch to using sparse keymap library Dmitry Torokhov
2009-12-02  9:24 ` [PATCH 3/8] Input: dell-wmi " Dmitry Torokhov
2009-12-02  9:24 ` [PATCH 4/8] Input: hp-wmi " Dmitry Torokhov
2009-12-03  9:58   ` Anisse Astier
2009-12-03 10:03     ` Dmitry Torokhov [this message]
2009-12-02  9:24 ` [PATCH 5/8] Input: eeepc-laptop " Dmitry Torokhov
2009-12-02  9:24 ` [PATCH 6/8] Input: asus-laptop " Dmitry Torokhov
2009-12-02  9:24 ` [PATCH 7/8] Input: topstar-laptop " Dmitry Torokhov
2009-12-02  9:24 ` [PATCH 8/8] Input: panasonic-laptop " Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091203100338.GA32433@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=anisse@astier.eu \
    --cc=carlos@strangeworlds.co.uk \
    --cc=corentincj@iksaif.net \
    --cc=herton@mandriva.com.br \
    --cc=laforge@gnumonks.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=wuzhangjin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).