HID: pidff: Clamp effect playback LOOP_COUNT value
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Tue, 25 Feb 2025 22:30:01 +0000 (23:30 +0100)
committerJiri Kosina <jkosina@suse.com>
Tue, 4 Mar 2025 20:42:44 +0000 (21:42 +0100)
commit0c6673e3d17b258b8c5c7331d28bf6c49f25ed30
treed29ba3a5efb91665d7da55059f60a3286bbb706a
parentbbeface1051142bcb0473fdcc89102ea5b31607d
HID: pidff: Clamp effect playback LOOP_COUNT value

Ensures the loop count will never exceed the logical_maximum.

Fixes implementation errors happening when applications use the max
value of int32/DWORD as the effect iterations. This could be observed
when running software both native and in wine.

Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/usbhid/hid-pidff.c