]> err.no Git - linux-2.6/commitdiff
Fix sh_keysc double free
authorMagnus Damm <magnus.damm@gmail.com>
Fri, 21 Mar 2008 11:14:46 +0000 (20:14 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 18 Apr 2008 16:50:02 +0000 (09:50 -0700)
Avoid double free situation from happening by removing input_free_device()
after input_unregister_device(). Suggested by Dmitry Torokhov.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/input/keyboard/sh_keysc.c

index 5d0864a9e94bbe84d696297428ff2d0cc3bdd231..8486abc457edd02c982cde57319388711cddc694 100644 (file)
@@ -238,7 +238,6 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev)
 
        input_unregister_device(priv->input);
        free_irq(platform_get_irq(pdev, 0), pdev);
-       input_free_device(priv->input);
        iounmap(priv->iomem_base);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);