Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c973d4b5 authored by Michał Kępień's avatar Michał Kępień Committed by Darren Hart
Browse files

platform/x86: ideapad-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: default avatarMichał Kępień <kernel@kempniu.pl>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 3a3c1115
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -604,14 +604,12 @@ static int ideapad_input_init(struct ideapad_private *priv)
	error = input_register_device(inputdev);
	if (error) {
		pr_err("Unable to register input device\n");
		goto err_free_keymap;
		goto err_free_dev;
	}

	priv->inputdev = inputdev;
	return 0;

err_free_keymap:
	sparse_keymap_free(inputdev);
err_free_dev:
	input_free_device(inputdev);
	return error;
@@ -619,7 +617,6 @@ static int ideapad_input_init(struct ideapad_private *priv)

static void ideapad_input_exit(struct ideapad_private *priv)
{
	sparse_keymap_free(priv->inputdev);
	input_unregister_device(priv->inputdev);
	priv->inputdev = NULL;
}