Skip to contentSkip to conversation

touchscreen: tnetv107x: fix input_device leak

PATCH In review Vasiliy Kulikov 2 participants 2 messages Sep 26, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 touchscreen: tnetv107x: fix input_device leak

tsc_probe() calls input_free_device() on error, but tsc_remove() doesn't.

---
 drivers/input/touchscreen/tnetv107x-ts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/touchscreen/tnetv107x-ts.c +1 -0
index cf1dba2..82d9a01 100644
@@ -361,6 +361,7 @@ static int __devexit tsc_remove(struct platform_device *pdev)
 
 	input_unregister_device(ts->input_dev);
 	free_irq(ts->tsc_irq, ts);
+	input_free_device(ts->input_dev);
 	clk_put(ts->clk);
 	iounmap(ts->regs);
 	release_mem_region(ts->res->start, resource_size(ts->res));
Signature · 1 line
1.7.0.4
maintainer
#1 lore raw
Quoted 2 lines · Vasiliy Kulikov

tsc_probe() calls input_free_device() on error, but tsc_remove() doesn't.

NAK. It is forbidden to call input_free_device() after unregister.

Thanks.

Signature · 1 line
Dmitry