Input: tegra-kbc - correct call to input_free_device
Subsystems (4)
PATCH RESEND 1/1 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.
--- drivers/input/keyboard/tegra-kbc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/keyboard/tegra-kbc.c +1 -1
@@ -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;
Signature · 1 line
1.7.4.1
Axel Lin wrote at Thursday, August 11, 2011 2:49 AM:
Quoted 5 lines
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 <[email protected]>
Quoted 19 lines
--- drivers/input/keyboard/tegra-kbc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/input/keyboard/tegra-kbc.c +1
-2@@ -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; --1.7.4.1
Signature · 1 line
nvpublic
Dmitry Torokhov
maintainerQuoted 8 lines · Stephen Warren
Axel Lin wrote at Thursday, August 11, 2011 2:49 AM:
Quoted 5 lines
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 <[email protected]>Reviewed-by Stephen Warren <[email protected]>
Gah, sorry, already pushed into my public branch so won't be able so add your reviewed-by...
Signature · 1 line
Dmitry
Dmitry Torokhov wrote at Thursday, August 11, 2011 10:52 AM:
Quoted 6 lines · Stephen Warren
Quoted 5 lines
Axel Lin wrote at Thursday, August 11, 2011 2:49 AM:
Quoted 4 lines
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.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Axel Lin <[email protected]>Reviewed-by Stephen Warren <[email protected]>Gah, sorry, already pushed into my public branch so won't be able so add your reviewed-by...
No worries; you had no reason to expect anyone to review it!
Signature · 1 line
nvpublic