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

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: default avatarMichał Kępień <kernel@kempniu.pl>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 815edfe7
...@@ -1205,14 +1205,12 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc) ...@@ -1205,14 +1205,12 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc)
error = input_register_device(input); error = input_register_device(input);
if (error) { if (error) {
pr_err("Unable to register input device\n"); pr_err("Unable to register input device\n");
goto err_free_keymap; goto err_free_dev;
} }
eeepc->inputdev = input; eeepc->inputdev = input;
return 0; return 0;
err_free_keymap:
sparse_keymap_free(input);
err_free_dev: err_free_dev:
input_free_device(input); input_free_device(input);
return error; return error;
...@@ -1220,10 +1218,8 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc) ...@@ -1220,10 +1218,8 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc)
static void eeepc_input_exit(struct eeepc_laptop *eeepc) static void eeepc_input_exit(struct eeepc_laptop *eeepc)
{ {
if (eeepc->inputdev) { if (eeepc->inputdev)
sparse_keymap_free(eeepc->inputdev);
input_unregister_device(eeepc->inputdev); input_unregister_device(eeepc->inputdev);
}
eeepc->inputdev = NULL; eeepc->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