diff mbox

Input: tegra-kbc - correct call to input_free_device

Message ID 1311148372.10091.3.camel@phoenix (mailing list archive)
State Accepted
Commit 22f83205e59c97c2460ad8e4bd6e71268cb2f37f
Headers show

Commit Message

axel lin July 20, 2011, 7:52 a.m. UTC
This error handling code can be reached before kbc->idev is
initialized, so it is safer to always use the original name,
input_dev.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/input/keyboard/tegra-kbc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 2b3b73e..8e40f2b 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -701,7 +701,7 @@  err_iounmap:
 err_free_mem_region:
 	release_mem_region(res->start, resource_size(res));
 err_free_mem:
-	input_free_device(kbc->idev);
+	input_free_device(input_dev);
 	kfree(kbc);
 
 	return err;