drivers: can: rcar: merge nested if-statements into one

Merge two nested if-statements into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2025-05-27 20:15:24 +00:00 committed by Benjamin Cabé
parent 09f54c98a7
commit 40ec42e26f

View File

@ -1023,11 +1023,9 @@ static int can_rcar_init(const struct device *dev)
data->common.state_change_cb = NULL;
data->common.state_change_cb_user_data = NULL;
if (config->common.phy != NULL) {
if (!device_is_ready(config->common.phy)) {
LOG_ERR("CAN transceiver not ready");
return -ENODEV;
}
if (config->common.phy != NULL && !device_is_ready(config->common.phy)) {
LOG_ERR("CAN transceiver not ready");
return -ENODEV;
}
if (!device_is_ready(config->clock_dev)) {