Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: do not check number of events in input_pass_values()

Now that the input_dev->vals array is always there we can be assured
that input_pass_values() is always called with a non-0 number of
events. Remove the check.

Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Link: https://lore.kernel.org/r/20240703213756.3375978-8-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

-3
-3
drivers/input/input.c
··· 115 115 116 116 lockdep_assert_held(&dev->event_lock); 117 117 118 - if (!count) 119 - return; 120 - 121 118 rcu_read_lock(); 122 119 123 120 handle = rcu_dereference(dev->grab);