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>
* 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,