Skip to content

Commit

Permalink
drives/input: Fix wrong touch event notification.
Browse files Browse the repository at this point in the history
In the ist415_forced_release function data.npoints can be 0.
(There is no pushed touch point)

But, since touch is reported even if touch point count is 0.

Therefore, fix wrong null touch event

Signed-off-by: eunwoo.nam <[email protected]>
  • Loading branch information
ewoodev committed Jan 9, 2025
1 parent 507596b commit 41b8765
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion os/drivers/input/ist415.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ static void ist415_forced_release(struct ist415_dev_s *dev)
dev->touched[i] = false;
}
}
touch_report(dev->upper, &data);

if (data.npoints > 0) {
touch_report(dev->upper, &data);
}
}

/****************************************************************************
Expand Down

0 comments on commit 41b8765

Please sign in to comment.