Files
u-boot-krane/drivers
Boon Khai NgandJerome Forissier f517fdbc0d net: dwc_eth_xgmac: Return -ENODEV when phy_connect() fails
When multiple Ethernet controllers are enabled in the device tree,
but only one controller is actually present in hardware, the
non-existent controller still attempts to connect to a PHY.

In this case, phy_connect() may return NULL without setting an
error code. The current driver only logs the failure but does not
propagate an error, causing the initialization flow to continue
with an invalid PHY handle.

This leads to failures later in the initialization sequence.

Fix this by explicitly setting ret = -ENODEV when phy_connect()
returns NULL, ensuring the driver exits cleanly on failure.

Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
2026-07-23 17:05:21 +02:00
..