Re: [PATCH] Input: joydev - replace ev_match boolean with goto for early exit
From: Dmitry Torokhov
Date: Sat Jul 11 2026 - 18:47:59 EST
Hi Ashton,
On Thu, Jul 09, 2026 at 04:18:49PM +1200, Ashton Warner wrote:
> The joydev_dev_is_absolute_mouse runs unnecessary Event type checks to
> determine whether a joydev device is an absolute mouse. Change ev_match
> to a goto statement to exit early.
>
> Signed-off-by: Ashton Warner <drflamemontgomery@xxxxxxxxx>
I think this is one of the cases where I'd avoid using goto. The extra
computation is not in hot path and will be unnoticeable.
Thanks.
--
Dmitry