[PATCH 6.1.y] HID: core: Harden s32ton() against conversion to 0 bits