diff options
author | Michał Kępień <kernel@kempniu.pl> | 2017-03-09 13:11:44 +0100 |
---|---|---|
committer | Darren Hart <dvhart@infradead.org> | 2017-03-14 22:58:07 -0700 |
commit | c973d4b578a46f8fb822bed2d3a0d3a752d02ecf (patch) | |
tree | 127f9233b55571b8466e0534fde07c07f947f1e1 /drivers/platform/x86/ideapad-laptop.c | |
parent | 3a3c1115ce55f02e6185338808a4b7959b46e334 (diff) | |
download | linux-c973d4b578a46f8fb822bed2d3a0d3a752d02ecf.tar.bz2 |
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: Michał Kępień <kernel@kempniu.pl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/ideapad-laptop.c')
-rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index cc6d91e18683..ca5eeb4d417d 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -604,14 +604,12 @@ static int ideapad_input_init(struct ideapad_private *priv) error = input_register_device(inputdev); if (error) { pr_err("Unable to register input device\n"); - goto err_free_keymap; + goto err_free_dev; } priv->inputdev = inputdev; return 0; -err_free_keymap: - sparse_keymap_free(inputdev); err_free_dev: input_free_device(inputdev); return error; @@ -619,7 +617,6 @@ err_free_dev: static void ideapad_input_exit(struct ideapad_private *priv) { - sparse_keymap_free(priv->inputdev); input_unregister_device(priv->inputdev); priv->inputdev = NULL; } |