drivers: can: avoid integer overflow in expression
Change the integer arithmetic to divide first before multiply.
The muliplication of sys_clock_hw_cycles_per_sec() by ten leads
to a really big number on boards with high-speed clocking, thus
to the overflow warning, and to errors for integration tests.
Fixes: #63678
Signed-off-by:
Stephan Linz <linz@li-pro.net>
Loading
Please sign in to comment