platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path
Subsystems (2)
PATCH 1/1 platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path
Signed-off-by Axel Lin <[email protected]>
--- drivers/platform/x86/msi-wmi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/platform/x86/msi-wmi.c +1 -0
@@ -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 );
Signature · 1 line
1.7.4.1
Quoted 10 lines · Axel Lin
Signed-off-by Axel Lin <[email protected]>--- drivers/platform/x86/msi-wmi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/platform/x86/msi-wmi.c +0
-0
drivers/platform/x86/msi-wmi.c static int __init msi_wmi_init(void) · line 276
Quoted 5 lines
drivers/platform/x86/msi-wmi.c +1
-0@@ -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 <[email protected]>
PS: It might already have been asked, but what's your secret Axel ? Do you use static/dynamic analysis tools ? Which ones ?
Quoted 4 lines
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
Quoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>
Acked-by Dmitry Torokhov <[email protected]>
Quoted 21 lines
--- drivers/platform/x86/msi-wmi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/platform/x86/msi-wmi.c +1
-0@@ -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 );Signature · 1 line
1.7.4.1
Signature · 1 line
Dmitry