drivers: can: mcux: flexcan: fail init if clock device is not ready
Fail the NXP MCUX FlexCAN driver initialization of the clock controller device is not ready. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
d7405647df
commit
69238dbfee
1 changed files with 5 additions and 0 deletions
|
@ -701,6 +701,11 @@ static int mcux_flexcan_init(const struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
if (!device_is_ready(config->clock_dev)) {
|
||||
LOG_ERR("clock device not ready");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
k_mutex_init(&data->rx_mutex);
|
||||
k_sem_init(&data->tx_allocs_sem, MCUX_FLEXCAN_MAX_TX,
|
||||
MCUX_FLEXCAN_MAX_TX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue