diff options
author | Michał Kępień <kernel@kempniu.pl> | 2017-03-09 15:11:39 +0300 |
---|---|---|
committer | Darren Hart <dvhart@infradead.org> | 2017-03-15 08:58:03 +0300 |
commit | c2ef3a1c97adbe26d1a10d878e353436a3978409 (patch) | |
tree | e92832e40698926feca7d004cbb38b8cf1b3659e /drivers/platform | |
parent | f118b312bdd729b33165c6614e2370f019baad6e (diff) | |
download | linux-c2ef3a1c97adbe26d1a10d878e353436a3978409.tar.xz |
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: Michał Kępień <kernel@kempniu.pl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/asus-wmi.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 8fe5890bf539..d817e6327fec 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -269,12 +269,10 @@ static int asus_wmi_input_init(struct asus_wmi *asus) err = input_register_device(asus->inputdev); if (err) - goto err_free_keymap; + goto err_free_dev; return 0; -err_free_keymap: - sparse_keymap_free(asus->inputdev); err_free_dev: input_free_device(asus->inputdev); return err; @@ -282,10 +280,8 @@ err_free_dev: static void asus_wmi_input_exit(struct asus_wmi *asus) { - if (asus->inputdev) { - sparse_keymap_free(asus->inputdev); + if (asus->inputdev) input_unregister_device(asus->inputdev); - } asus->inputdev = NULL; } |