[PATCH] gpio: rockchip: Fix debounce arithmetic for GPIO v2
Bartosz Golaszewski
bartosz.golaszewski at oss.qualcomm.com
Wed Oct 28 02:30:47 PDT 2026
On Fri, 23 Oct 2026 16:21:05 +0800, Cunhao Lu wrote:
> The debounce interval calculations use unsigned long operands. On 32-bit
> systems, the numerator used to calculate the maximum interval overflows
> before division, while multiplying the requested interval by the clock
> rate overflows before it is assigned to a u64. A zero debounce clock rate
> also causes division by zero.
>
> Use 64-bit arithmetic for both calculations and reject a zero clock rate
> before division.
>
> [...]
Applied, thanks!
[1/1] gpio: rockchip: Fix debounce arithmetic for GPIO v2
https://git.kernel.org/brgl/c/13467fd6998f5da4f5b4f172f1af3d9c48d5de8f
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
More information about the linux-arm-kernel
mailing list