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>
error = i8042_install_filter(toshiba_acpi_i8042_filter);
if (error) {
pr_err("Error installing key filter\n");
- goto err_free_keymap;
+ goto err_free_dev;
}
dev->ntfy_supported = 1;
err_remove_filter:
if (dev->ntfy_supported)
i8042_remove_filter(toshiba_acpi_i8042_filter);
- err_free_keymap:
- sparse_keymap_free(dev->hotkey_dev);
err_free_dev:
input_free_device(dev->hotkey_dev);
dev->hotkey_dev = NULL;
cancel_work_sync(&dev->hotkey_work);
}
- if (dev->hotkey_dev) {
+ if (dev->hotkey_dev)
input_unregister_device(dev->hotkey_dev);
- sparse_keymap_free(dev->hotkey_dev);
- }
backlight_device_unregister(dev->backlight_dev);