drivers: can: init timing.sjw also in canfd mode
This commit resolves the undefined behviour caused by missing timing.sjw initialization. Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
parent
2b2a2cad68
commit
12c80eba71
1 changed files with 1 additions and 1 deletions
|
@ -343,11 +343,11 @@ int can_mcan_init(const struct device *dev, const struct can_mcan_config *cfg,
|
|||
}
|
||||
#endif
|
||||
|
||||
timing.sjw = cfg->sjw;
|
||||
#ifdef CONFIG_CAN_FD_MODE
|
||||
timing_data.sjw = cfg->sjw_data;
|
||||
can_mcan_configure_timing(can, &timing, &timing_data);
|
||||
#else
|
||||
timing.sjw = cfg->sjw;
|
||||
can_mcan_configure_timing(can, &timing, NULL);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue