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

platform/x86: ideapad-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 3a3c1115
...@@ -604,14 +604,12 @@ static int ideapad_input_init(struct ideapad_private *priv) ...@@ -604,14 +604,12 @@ static int ideapad_input_init(struct ideapad_private *priv)
error = input_register_device(inputdev); error = input_register_device(inputdev);
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;
} }
priv->inputdev = inputdev; priv->inputdev = inputdev;
return 0; return 0;
err_free_keymap:
sparse_keymap_free(inputdev);
err_free_dev: err_free_dev:
input_free_device(inputdev); input_free_device(inputdev);
return error; return error;
...@@ -619,7 +617,6 @@ static int ideapad_input_init(struct ideapad_private *priv) ...@@ -619,7 +617,6 @@ static int ideapad_input_init(struct ideapad_private *priv)
static void ideapad_input_exit(struct ideapad_private *priv) static void ideapad_input_exit(struct ideapad_private *priv)
{ {
sparse_keymap_free(priv->inputdev);
input_unregister_device(priv->inputdev); input_unregister_device(priv->inputdev);
priv->inputdev = NULL; priv->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