Commit a535a9f1 authored by Dudley Du's avatar Dudley Du Committed by Dmitry Torokhov

Input: cyapa - fix variable being dereferenced before check

Fixes the warning regarding variable being dereferenced before check
'gen5_pip->resp_len'.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDudley Du <dudl@cypress.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 2be7256f
......@@ -2557,6 +2557,8 @@ static bool cyapa_gen5_irq_cmd_handler(struct cyapa *cyapa)
* trackpad device when booting/rebooting
* their chrome book.
*/
length = 0;
if (gen5_pip->resp_len)
length = *gen5_pip->resp_len;
cyapa_empty_pip_output_data(cyapa,
gen5_pip->resp_data,
......
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