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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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,