diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-03-21 07:14:46 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-04-18 12:50:02 -0400 |
commit | 6dea7814e1c6a27701a63b271fc580791e066537 (patch) | |
tree | 8923a7ca7fa0d0a4a6775146368c3015a1deb705 /drivers/input/keyboard | |
parent | 9460c0ce9b29825d279081d5078815a32c268ada (diff) |
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 <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/sh_keysc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index 5d0864a9e94b..8486abc457ed 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) | |||
238 | 238 | ||
239 | input_unregister_device(priv->input); | 239 | input_unregister_device(priv->input); |
240 | free_irq(platform_get_irq(pdev, 0), pdev); | 240 | free_irq(platform_get_irq(pdev, 0), pdev); |
241 | input_free_device(priv->input); | ||
242 | iounmap(priv->iomem_base); | 241 | iounmap(priv->iomem_base); |
243 | 242 | ||
244 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 243 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |