[PATCH] keyboard: tnetv107x: fix input_device leak

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

 



keypad_probe() calls input_free_device() on error, but keypad_remove()
doesn't.
---
 Compile tested.

 drivers/input/keyboard/tnetv107x-keypad.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c
index b4a81eb..1ea20e1 100644
--- a/drivers/input/keyboard/tnetv107x-keypad.c
+++ b/drivers/input/keyboard/tnetv107x-keypad.c
@@ -305,6 +305,7 @@ static int __devexit keypad_remove(struct platform_device *pdev)
 	free_irq(kp->irq_press, kp);
 	free_irq(kp->irq_release, kp);
 	input_unregister_device(kp->input_dev);
+	input_free_device(kp->input_dev);
 	clk_put(kp->clk);
 	iounmap(kp->regs);
 	release_mem_region(kp->res->start, resource_size(kp->res));
-- 
1.7.0.4

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