summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/cyapa_gen5.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/mouse/cyapa_gen5.c b/drivers/input/mouse/cyapa_gen5.c
index 9a4a422afc2..ddf5393a118 100644
--- 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,