From: Magnus Damm Date: Fri, 21 Mar 2008 11:14:46 +0000 (+0900) Subject: Fix sh_keysc double free X-Git-Tag: v2.6.26-rc1~1135^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6dea7814e1c6a27701a63b271fc580791e066537;p=linux-2.6-omap-h63xx.git Fix sh_keysc double free Avoid double free situation from happening by removing input_free_device() after input_unregister_device(). Suggested by Dmitry Torokhov. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt --- diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index 5d0864a9e94..8486abc457e 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c @@ -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);