diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-08-11 18:22:45 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-08-11 18:23:06 +0200 |
commit | 22f83205e59c97c2460ad8e4bd6e71268cb2f37f (patch) | |
tree | 79321bf89d9b4011949ea1b0a88921c3a942d4c0 /drivers/input/keyboard/tegra-kbc.c | |
parent | Input: mpu3050 - correct call to input_free_device (diff) | |
download | linux-22f83205e59c97c2460ad8e4bd6e71268cb2f37f.tar.xz linux-22f83205e59c97c2460ad8e4bd6e71268cb2f37f.zip |
Input: tegra-kbc - correct call to input_free_device
If kzalloc for kbc fails, then we have NULL pointer dereference while
calling input_free_device(kbc->idev) in the error handling.
So it is safer to always use the original name, input_dev.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/tegra-kbc.c')
-rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index f270447ba951..a5a77915c650 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -702,7 +702,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; |