Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6dea7814 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt
Browse files

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: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 9460c0ce
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);