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: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dea7814e1c6a27701a63b271fc580791e066537;p=linux-2.6 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 5d0864a9e9..8486abc457 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);