gpio-button-hotplug: fix crash on remove
authorJonas Gorski <jogo@openwrt.org>
Tue, 17 Dec 2013 19:05:03 +0000 (19:05 +0000)
committerJonas Gorski <jogo@openwrt.org>
Tue, 17 Dec 2013 19:05:03 +0000 (19:05 +0000)
Don't call gpio_keys_remove recursively. Setting the platform
data to NULL triggered an oops on the second iteration, so there was
no infinate loop.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39124

package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c

index 1a8b47691ce64f4022fda4e20202114a4ef19710..780736c89bb66c1904a718514f10ec7ad6b47813 100644 (file)
@@ -612,7 +612,7 @@ static int gpio_keys_remove(struct platform_device *pdev)
        if (bdev->polled)
                gpio_keys_polled_close(bdev);
 
-       return gpio_keys_remove(pdev);
+       return 0;
 }
 
 static struct platform_driver gpio_keys_driver = {