dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Axel Lin 2011-08-11 09:22:45 -07:00 committed by Dmitry Torokhov
parent d9b830fa44
commit 22f83205e5
1 changed files with 1 additions and 1 deletions

View File

@ -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;