public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path
@ 2011-07-06  3:05 Axel Lin
  2011-07-06  8:31 ` Anisse Astier
  2011-07-06 20:04 ` Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2011-07-06  3:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dmitry Torokhov, Thomas Renninger, Anisse Astier, Matthew Garrett,
	platform-driver-x86

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/platform/x86/msi-wmi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
index c832e33..6f40bf2 100644
--- a/drivers/platform/x86/msi-wmi.c
+++ b/drivers/platform/x86/msi-wmi.c
@@ -272,6 +272,7 @@ static int __init msi_wmi_init(void)
 err_free_backlight:
 	backlight_device_unregister(backlight);
 err_free_input:
+	sparse_keymap_free(msi_wmi_input_dev);
 	input_unregister_device(msi_wmi_input_dev);
 err_uninstall_notifier:
 	wmi_remove_notify_handler(MSIWMI_EVENT_GUID);
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path
  2011-07-06  3:05 [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path Axel Lin
@ 2011-07-06  8:31 ` Anisse Astier
  2011-07-06  8:45   ` Axel Lin
  2011-07-06 20:04 ` Dmitry Torokhov
  1 sibling, 1 reply; 4+ messages in thread
From: Anisse Astier @ 2011-07-06  8:31 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Dmitry Torokhov, Thomas Renninger, Matthew Garrett,
	platform-driver-x86

On Wed, 06 Jul 2011 11:05:20 +0800, Axel Lin <axel.lin@gmail.com> wrote :

> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/platform/x86/msi-wmi.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
> index c832e33..6f40bf2 100644
> --- a/drivers/platform/x86/msi-wmi.c
> +++ b/drivers/platform/x86/msi-wmi.c
> @@ -272,6 +272,7 @@ static int __init msi_wmi_init(void)
>  err_free_backlight:
>  	backlight_device_unregister(backlight);
>  err_free_input:
> +	sparse_keymap_free(msi_wmi_input_dev);
>  	input_unregister_device(msi_wmi_input_dev);

Nice catch ! Maybe doing the init in two different functions wasn't the
best for error handling.

Acked-by: Anisse Astier <anisse@astier.eu>

PS: It might already have been asked, but what's your secret Axel ? Do
you use static/dynamic analysis tools ? Which ones ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path
  2011-07-06  8:31 ` Anisse Astier
@ 2011-07-06  8:45   ` Axel Lin
  0 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2011-07-06  8:45 UTC (permalink / raw)
  To: Anisse Astier
  Cc: linux-kernel, Dmitry Torokhov, Thomas Renninger, Matthew Garrett,
	platform-driver-x86

>
> PS: It might already have been asked, but what's your secret Axel ? Do
> you use static/dynamic analysis tools ? Which ones ?
>
Actually, I just read the code.
I don't use any special analysis tool, maybe just use grep.

Regards,
Axel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path
  2011-07-06  3:05 [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path Axel Lin
  2011-07-06  8:31 ` Anisse Astier
@ 2011-07-06 20:04 ` Dmitry Torokhov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2011-07-06 20:04 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Thomas Renninger, Anisse Astier, Matthew Garrett,
	platform-driver-x86

On Wed, Jul 06, 2011 at 11:05:20AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Dmitry Torokhov <dtor@mail.ru>

> ---
>  drivers/platform/x86/msi-wmi.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
> index c832e33..6f40bf2 100644
> --- a/drivers/platform/x86/msi-wmi.c
> +++ b/drivers/platform/x86/msi-wmi.c
> @@ -272,6 +272,7 @@ static int __init msi_wmi_init(void)
>  err_free_backlight:
>  	backlight_device_unregister(backlight);
>  err_free_input:
> +	sparse_keymap_free(msi_wmi_input_dev);
>  	input_unregister_device(msi_wmi_input_dev);
>  err_uninstall_notifier:
>  	wmi_remove_notify_handler(MSIWMI_EVENT_GUID);
> -- 
> 1.7.4.1
> 
> 
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-06 20:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06  3:05 [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path Axel Lin
2011-07-06  8:31 ` Anisse Astier
2011-07-06  8:45   ` Axel Lin
2011-07-06 20:04 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox