Commit 22f83205 authored by Axel Lin's avatar Axel Lin Committed by Dmitry Torokhov

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent d9b830fa
...@@ -702,7 +702,7 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev) ...@@ -702,7 +702,7 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev)
err_free_mem_region: err_free_mem_region:
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
err_free_mem: err_free_mem:
input_free_device(kbc->idev); input_free_device(input_dev);
kfree(kbc); kfree(kbc);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment