summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/topstar-laptop.c
diff options
context:
space:
mode:
authorMichał Kępień <kernel@kempniu.pl>2017-03-09 15:11:48 +0300
committerDarren Hart <dvhart@infradead.org>2017-03-15 08:58:10 +0300
commit3f2e1a323a8391a142943ebbc862de5633a381e0 (patch)
treef25d3a454d55532941d510032bf33ea3b1b4d0e8 /drivers/platform/x86/topstar-laptop.c
parentb09b9195b3722928918a5e612f7aec5719a061bb (diff)
downloadlinux-3f2e1a323a8391a142943ebbc862de5633a381e0.tar.xz
platform/x86: topstar-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/topstar-laptop.c')
-rw-r--r--drivers/platform/x86/topstar-laptop.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
index e597de05e6c2..70205d222da9 100644
--- a/drivers/platform/x86/topstar-laptop.c
+++ b/drivers/platform/x86/topstar-laptop.c
@@ -113,14 +113,12 @@ static int acpi_topstar_init_hkey(struct topstar_hkey *hkey)
error = input_register_device(input);
if (error) {
pr_err("Unable to register input device\n");
- goto err_free_keymap;
+ goto err_free_dev;
}
hkey->inputdev = input;
return 0;
- err_free_keymap:
- sparse_keymap_free(input);
err_free_dev:
input_free_device(input);
return error;
@@ -157,7 +155,6 @@ static int acpi_topstar_remove(struct acpi_device *device)
acpi_topstar_fncx_switch(device, false);
- sparse_keymap_free(tps_hkey->inputdev);
input_unregister_device(tps_hkey->inputdev);
kfree(tps_hkey);