Re: [PATCH] platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> ---
>  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@xxxxxxxxx>

PS: It might already have been asked, but what's your secret Axel ? Do
you use static/dynamic analysis tools ? Which ones ?
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux