Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1596011
| From | Michał Kępień <kernel@kempniu.pl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 06/14] platform/x86: eeepc-laptop: remove sparse_keymap_free() calls |
| Date | 2017-03-09 13:20 +0100 |
| Message-ID | <tj5d1-523-51@gated-at.bofh.it> (permalink) |
| References | <tj5cZ-523-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
drivers/platform/x86/eeepc-laptop.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 8cdf315f9730..6f11c51b7e60 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -1205,14 +1205,12 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc)
error = input_register_device(input);
if (error) {
pr_err("Unable to register input device\n");
- goto err_free_keymap;
+ goto err_free_dev;
}
eeepc->inputdev = input;
return 0;
-err_free_keymap:
- sparse_keymap_free(input);
err_free_dev:
input_free_device(input);
return error;
@@ -1220,10 +1218,8 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc)
static void eeepc_input_exit(struct eeepc_laptop *eeepc)
{
- if (eeepc->inputdev) {
- sparse_keymap_free(eeepc->inputdev);
+ if (eeepc->inputdev)
input_unregister_device(eeepc->inputdev);
- }
eeepc->inputdev = NULL;
}
--
2.12.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/14] platform/x86: remove sparse_keymap_free() calls Michał Kępień <kernel@kempniu.pl> - 2017-03-09 13:20 +0100 [PATCH 07/14] platform/x86: hp-wmi: remove sparse_keymap_free() calls Michał Kępień <kernel@kempniu.pl> - 2017-03-09 13:20 +0100 [PATCH 06/14] platform/x86: eeepc-laptop: remove sparse_keymap_free() calls Michał Kępień <kernel@kempniu.pl> - 2017-03-09 13:20 +0100 [PATCH 04/14] platform/x86: dell-wmi-aio: remove sparse_keymap_free() calls Michał Kępień <kernel@kempniu.pl> - 2017-03-09 13:20 +0100 [PATCH 10/14] platform/x86: msi-wmi: remove sparse_keymap_free() calls Michał Kępień <kernel@kempniu.pl> - 2017-03-09 13:20 +0100 [PATCH 14/14] platform/x86: toshiba_acpi: remove sparse_keymap_free() calls Michał Kępień <kernel@kempniu.pl> - 2017-03-09 13:30 +0100 Re: [PATCH 00/14] platform/x86: remove sparse_keymap_free() calls Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-13 17:20 +0100
csiph-web