Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1596006 > unrolled thread

[PATCH 02/14] platform/x86: asus-laptop: remove sparse_keymap_free() calls

Started byMichał Kępień <kernel@kempniu.pl>
First post2017-03-09 13:20 +0100
Last post2017-03-09 13:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 02/14] platform/x86: asus-laptop: remove sparse_keymap_free() calls Michał Kępień <kernel@kempniu.pl> - 2017-03-09 13:20 +0100

#1596006 — [PATCH 02/14] platform/x86: asus-laptop: remove sparse_keymap_free() calls

FromMichał Kępień <kernel@kempniu.pl>
Date2017-03-09 13:20 +0100
Subject[PATCH 02/14] platform/x86: asus-laptop: remove sparse_keymap_free() calls
Message-ID<tj5d0-523-29@gated-at.bofh.it>
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/asus-laptop.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 28551f5a2e07..c4768be24ba9 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -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;
 }
 
-- 
2.12.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web