drivers: can: mcan: fix bounds check for data phase prescaler
Fix the bounds check for the data phase prescaler timing parameter. The maximum allowed value is 0x20, not 20 decimal. Fixes: #44483 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
47119333e1
commit
a1e33d8868
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ void can_mcan_configure_timing(struct can_mcan_reg *can,
|
|||
timing_data->phase_seg1 > 0);
|
||||
__ASSERT_NO_MSG(timing_data->phase_seg2 <= 0x10 &&
|
||||
timing_data->phase_seg2 > 0);
|
||||
__ASSERT_NO_MSG(timing_data->prescaler <= 20 &&
|
||||
__ASSERT_NO_MSG(timing_data->prescaler <= 0x20 &&
|
||||
timing_data->prescaler > 0);
|
||||
__ASSERT_NO_MSG(timing_data->sjw == CAN_SJW_NO_CHANGE ||
|
||||
(timing_data->sjw <= 0x80 && timing_data->sjw > 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue