We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45511fe commit 18aa6c8Copy full SHA for 18aa6c8
drivers/can/can_mcan.c
@@ -1390,11 +1390,9 @@ int can_mcan_init(const struct device *dev)
1390
k_mutex_init(&data->tx_mtx);
1391
k_sem_init(&data->tx_sem, cbs->num_tx, cbs->num_tx);
1392
1393
- if (config->common.phy != NULL) {
1394
- if (!device_is_ready(config->common.phy)) {
1395
- LOG_ERR("CAN transceiver not ready");
1396
- return -ENODEV;
1397
- }
+ if (config->common.phy != NULL && !device_is_ready(config->common.phy)) {
+ LOG_ERR("CAN transceiver not ready");
+ return -ENODEV;
1398
}
1399
1400
err = can_mcan_exit_sleep_mode(dev);
0 commit comments