From: Dmitry Torokhov Date: Wed, 3 Jul 2024 21:37:54 +0000 (-0700) Subject: Input: do not check number of events in input_pass_values() X-Git-Tag: v6.11-rc1~98^2^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=735877fde06304ae9d90e17102dc2b139e8d802a;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-8-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/input.c b/drivers/input/input.c index 4e12fa79883e1..54c57b267b25f 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -115,9 +115,6 @@ static void input_pass_values(struct input_dev *dev, lockdep_assert_held(&dev->event_lock); - if (!count) - return; - rcu_read_lock(); handle = rcu_dereference(dev->grab);