Explorar o código

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>
Magnus Damm %!s(int64=17) %!d(string=hai) anos
pai
achega
6dea7814e1
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  1. 0 1
      drivers/input/keyboard/sh_keysc.c

+ 0 - 1
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);