drivers: can: stm32fd: fix type of clock rate

the rate_tmp varaiable was int, but should be const uint32_t.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This commit is contained in:
Alexander Wachter 2022-01-16 16:49:53 +01:00 committed by Anas Nashif
commit 41643b0fac

View file

@ -24,9 +24,7 @@ Allowed values are 1 or 2 * n, where n <= 15
int can_stm32fd_get_core_clock(const struct device *dev, uint32_t *rate) int can_stm32fd_get_core_clock(const struct device *dev, uint32_t *rate)
{ {
ARG_UNUSED(dev); ARG_UNUSED(dev);
int rate_tmp; const uint32_t rate_tmp = LL_RCC_GetFDCANClockFreq(LL_RCC_FDCAN_CLKSOURCE);
rate_tmp = LL_RCC_GetFDCANClockFreq(LL_RCC_FDCAN_CLKSOURCE);
if (rate_tmp == LL_RCC_PERIPH_FREQUENCY_NO) { if (rate_tmp == LL_RCC_PERIPH_FREQUENCY_NO) {
LOG_ERR("Can't read core clock"); LOG_ERR("Can't read core clock");