Commit c2ef3a1c authored by Michał Kępień's avatar Michał Kępień Committed by Darren Hart

platform/x86: asus-wmi: remove sparse_keymap_free() calls

As sparse_keymap_setup() now uses a managed memory allocation for the
keymap copy it creates, the latter is freed automatically.  Remove all
calls to sparse_keymap_free().
Signed-off-by: default avatarMichał Kępień <kernel@kempniu.pl>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent f118b312
...@@ -269,12 +269,10 @@ static int asus_wmi_input_init(struct asus_wmi *asus) ...@@ -269,12 +269,10 @@ static int asus_wmi_input_init(struct asus_wmi *asus)
err = input_register_device(asus->inputdev); err = input_register_device(asus->inputdev);
if (err) if (err)
goto err_free_keymap; goto err_free_dev;
return 0; return 0;
err_free_keymap:
sparse_keymap_free(asus->inputdev);
err_free_dev: err_free_dev:
input_free_device(asus->inputdev); input_free_device(asus->inputdev);
return err; return err;
...@@ -282,10 +280,8 @@ static int asus_wmi_input_init(struct asus_wmi *asus) ...@@ -282,10 +280,8 @@ static int asus_wmi_input_init(struct asus_wmi *asus)
static void asus_wmi_input_exit(struct asus_wmi *asus) static void asus_wmi_input_exit(struct asus_wmi *asus)
{ {
if (asus->inputdev) { if (asus->inputdev)
sparse_keymap_free(asus->inputdev);
input_unregister_device(asus->inputdev); input_unregister_device(asus->inputdev);
}
asus->inputdev = NULL; asus->inputdev = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment