Input: wistron_btns - remove use of sparse_keymap_free
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 8 Mar 2017 17:27:27 +0000 (09:27 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 9 Mar 2017 18:06:12 +0000 (10:06 -0800)
Now that sparse keymap uses managed memory, we no longer need to clean it
up manually.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/wistron_btns.c

index e25f87ba19f6bb2b4e7dc2d42e53839147cd4682..43e67f54636650d832ab0c9461e6a0ee26401d1f 100644 (file)
@@ -1243,12 +1243,10 @@ static int setup_input_dev(void)
 
        error = input_register_polled_device(wistron_idev);
        if (error)
-               goto err_free_keymap;
+               goto err_free_dev;
 
        return 0;
 
- err_free_keymap:
-       sparse_keymap_free(input_dev);
  err_free_dev:
        input_free_polled_device(wistron_idev);
        return error;
@@ -1300,7 +1298,6 @@ static int wistron_remove(struct platform_device *dev)
 {
        wistron_led_remove();
        input_unregister_polled_device(wistron_idev);
-       sparse_keymap_free(wistron_idev->input);
        input_free_polled_device(wistron_idev);
        bios_detach();