From: Vasiliy Kulikov <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Cyril Chemparathy <cyril@ti.com>,
Kevin Hilman <khilman@deeprootsystems.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] keyboard: tnetv107x: fix input_device leak
Date: Sun, 26 Sep 2010 08:59:44 +0000 [thread overview]
Message-ID: <1285491584-32664-1-git-send-email-segooon@gmail.com> (raw)
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
next reply other threads:[~2010-09-26 8:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-26 8:59 Vasiliy Kulikov [this message]
2010-09-27 5:37 ` [PATCH] keyboard: tnetv107x: fix input_device leak Datta, Shubhrajyoti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285491584-32664-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=cyril@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=khilman@deeprootsystems.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox