[PATCH] Fix sh_keysc double free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

 drivers/input/keyboard/sh_keysc.c |    1 -
 1 file changed, 1 deletion(-)

--- 0001/drivers/input/keyboard/sh_keysc.c
+++ work/drivers/input/keyboard/sh_keysc.c	2008-03-21 10:58:20.000000000 +0900
@@ -238,7 +238,6 @@ static int __devexit sh_keysc_remove(str
 
 	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);
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux