diff options
author | Michał Kępień <kernel@kempniu.pl> | 2017-03-09 13:11:38 +0100 |
---|---|---|
committer | Darren Hart <dvhart@infradead.org> | 2017-03-15 06:58:02 +0100 |
commit | f118b312bdd729b33165c6614e2370f019baad6e (patch) | |
tree | c667b36640c3ba974be0d91123026591cc01a54d /drivers | |
parent | platform/x86: acer-wmi: remove sparse_keymap_free() calls (diff) | |
download | linux-f118b312bdd729b33165c6614e2370f019baad6e.tar.xz linux-f118b312bdd729b33165c6614e2370f019baad6e.zip |
platform/x86: asus-laptop: 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')
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 28551f5a2e07..c4768be24ba9 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -1516,14 +1516,12 @@ static int asus_input_init(struct asus_laptop *asus) error = input_register_device(input); if (error) { pr_warn("Unable to register input device\n"); - goto err_free_keymap; + goto err_free_dev; } asus->inputdev = input; return 0; -err_free_keymap: - sparse_keymap_free(input); err_free_dev: input_free_device(input); return error; @@ -1531,10 +1529,8 @@ err_free_dev: static void asus_input_exit(struct asus_laptop *asus) { - if (asus->inputdev) { - sparse_keymap_free(asus->inputdev); + if (asus->inputdev) input_unregister_device(asus->inputdev); - } asus->inputdev = NULL; } |