summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Kępień <kernel@kempniu.pl>2017-03-09 13:11:42 +0100
committerDarren Hart <dvhart@infradead.org>2017-03-15 06:58:05 +0100
commitde3c91c1ce073445e9cab5ad43fb038f896919b6 (patch)
treeab30ec12ebb61587ddd33c9bf16a3e93cd0e65c4
parentplatform/x86: dell-wmi: remove sparse_keymap_free() calls (diff)
downloadlinux-de3c91c1ce073445e9cab5ad43fb038f896919b6.tar.xz
linux-de3c91c1ce073445e9cab5ad43fb038f896919b6.zip
platform/x86: eeepc-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>
-rw-r--r--drivers/platform/x86/eeepc-laptop.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 8cdf315f9730..6f11c51b7e60 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -1205,14 +1205,12 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc)
error = input_register_device(input);
if (error) {
pr_err("Unable to register input device\n");
- goto err_free_keymap;
+ goto err_free_dev;
}
eeepc->inputdev = input;
return 0;
-err_free_keymap:
- sparse_keymap_free(input);
err_free_dev:
input_free_device(input);
return error;
@@ -1220,10 +1218,8 @@ err_free_dev:
static void eeepc_input_exit(struct eeepc_laptop *eeepc)
{
- if (eeepc->inputdev) {
- sparse_keymap_free(eeepc->inputdev);
+ if (eeepc->inputdev)
input_unregister_device(eeepc->inputdev);
- }
eeepc->inputdev = NULL;
}