projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2be7256
)
Input: cyapa - fix variable being dereferenced before check
author
Dudley Du
<dudl@cypress.com>
Thu, 22 Jan 2015 16:17:16 +0000
(08:17 -0800)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Thu, 22 Jan 2015 16:23:14 +0000
(08:23 -0800)
Fixes the warning regarding variable being dereferenced before check
'gen5_pip->resp_len'.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/cyapa_gen5.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/input/mouse/cyapa_gen5.c
b/drivers/input/mouse/cyapa_gen5.c
index 9a4a422afc2a401b0964eddc73e10c01b2694a42..ddf5393a118098fc87337d34e3808c0cfc28ce95 100644
(file)
--- a/
drivers/input/mouse/cyapa_gen5.c
+++ b/
drivers/input/mouse/cyapa_gen5.c
@@
-2557,7
+2557,9
@@
static bool cyapa_gen5_irq_cmd_handler(struct cyapa *cyapa)
* trackpad device when booting/rebooting
* their chrome book.
*/
- length = *gen5_pip->resp_len;
+ length = 0;
+ if (gen5_pip->resp_len)
+ length = *gen5_pip->resp_len;
cyapa_empty_pip_output_data(cyapa,
gen5_pip->resp_data,
&length,