提交 f118b312 编写于 作者: M Michał Kępień 提交者: Darren Hart

platform/x86: asus-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: NMichał Kępień <kernel@kempniu.pl>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
上级 cd1aaef0
......@@ -1516,14 +1516,12 @@ static int asus_input_init(struct asus_laptop *asus)
error = input_register_device(input);
if (error) {
pr_warn("Unable to register input device\n");
goto err_free_keymap;
goto err_free_dev;
}
asus->inputdev = input;
return 0;
err_free_keymap:
sparse_keymap_free(input);
err_free_dev:
input_free_device(input);
return error;
......@@ -1531,10 +1529,8 @@ static int asus_input_init(struct asus_laptop *asus)
static void asus_input_exit(struct asus_laptop *asus)
{
if (asus->inputdev) {
sparse_keymap_free(asus->inputdev);
if (asus->inputdev)
input_unregister_device(asus->inputdev);
}
asus->inputdev = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册