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 c4247c6 commit e4fa41eCopy full SHA for e4fa41e
drivers/can/can_mcp2515.c
@@ -918,11 +918,9 @@ static int mcp2515_init(const struct device *dev)
918
k_mutex_init(&dev_data->mutex);
919
k_sem_init(&dev_data->tx_sem, MCP2515_TX_CNT, MCP2515_TX_CNT);
920
921
- if (dev_cfg->common.phy != NULL) {
922
- if (!device_is_ready(dev_cfg->common.phy)) {
923
- LOG_ERR("CAN transceiver not ready");
924
- return -ENODEV;
925
- }
+ if (dev_cfg->common.phy != NULL && !device_is_ready(dev_cfg->common.phy)) {
+ LOG_ERR("CAN transceiver not ready");
+ return -ENODEV;
926
}
927
928
if (!spi_is_ready_dt(&dev_cfg->bus)) {
0 commit comments