Input: dm355evm_keys - remove use of sparse_keymap_free
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 8 Mar 2017 17:21:13 +0000 (09:21 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 9 Mar 2017 18:06:11 +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/dm355evm_keys.c

index 82e272ebc0ed0b968f5b1a131c8efede9e5b0591..5db493dfe509a940b527fb5aa939b946ab3d1fc9 100644 (file)
@@ -213,21 +213,19 @@ static int dm355evm_keys_probe(struct platform_device *pdev)
                                      IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
                                      dev_name(&pdev->dev), keys);
        if (status < 0)
-               goto fail2;
+               goto fail1;
 
        /* register */
        status = input_register_device(input);
        if (status < 0)
-               goto fail3;
+               goto fail2;
 
        platform_set_drvdata(pdev, keys);
 
        return 0;
 
-fail3:
-       free_irq(keys->irq, keys);
 fail2:
-       sparse_keymap_free(input);
+       free_irq(keys->irq, keys);
 fail1:
        input_free_device(input);
        kfree(keys);
@@ -241,7 +239,6 @@ static int dm355evm_keys_remove(struct platform_device *pdev)
        struct dm355evm_keys    *keys = platform_get_drvdata(pdev);
 
        free_irq(keys->irq, keys);
-       sparse_keymap_free(keys->input);
        input_unregister_device(keys->input);
        kfree(keys);