Skip to contentSkip to conversation

keyboard: tnetv107x: fix input_device leak

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

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

PATCH 1/1 keyboard: tnetv107x: fix input_device leak

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(-)
drivers/input/keyboard/tnetv107x-keypad.c +1 -0
index b4a81eb..1ea20e1 100644
@@ -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));
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 25 lines

-----Original Message-----
From: [email protected] [mailto:linux-input- [email protected]] On Behalf Of Vasiliy Kulikov
Sent: Sunday, September 26, 2010 2:30 PM
To: [email protected]
Cc: Dmitry Torokhov; Chemparathy, Cyril; Kevin Hilman; linux- [email protected]; [email protected]
Subject: [PATCH] keyboard: tnetv107x: fix input_device leak

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(-)
drivers/input/keyboard/tnetv107x-keypad.c +0 -0
index b4a81eb..1ea20e1 100644

drivers/input/keyboard/tnetv107x-keypad.c static int __devexit keypad_remove(struct · line 309

Quoted 5 lines
drivers/input/keyboard/tnetv107x-keypad.c +1 -0
@@ -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);

It does not seem to be correct.

Quoted 10 lines
drivers/input/keyboard/tnetv107x-keypad.c +0 -0
 	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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html