You need to sign in or sign up before continuing.
提交 a535a9f1 编写于 作者: D Dudley Du 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDudley Du <dudl@cypress.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 2be7256f
...@@ -2557,6 +2557,8 @@ static bool cyapa_gen5_irq_cmd_handler(struct cyapa *cyapa) ...@@ -2557,6 +2557,8 @@ static bool cyapa_gen5_irq_cmd_handler(struct cyapa *cyapa)
* trackpad device when booting/rebooting * trackpad device when booting/rebooting
* their chrome book. * their chrome book.
*/ */
length = 0;
if (gen5_pip->resp_len)
length = *gen5_pip->resp_len; length = *gen5_pip->resp_len;
cyapa_empty_pip_output_data(cyapa, cyapa_empty_pip_output_data(cyapa,
gen5_pip->resp_data, gen5_pip->resp_data,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册