HomeFreeBSD

dpaa: Account for MDIO device not being found

Description

dpaa: Account for MDIO device not being found

It's possible the MDIO device hasn't been and attached, or is incorrect
in the device tree so can't probe and attach. In this case,
ofw_bus_find_child_device_by_phandle() will fail, and return NULL.
Return an error from find_mdio() here to prevent the MAC from attaching,
rather than worry about a NULL pointer dereference later on when
accessing the PHY.

Details

Provenance
jhibbitsAuthored on Nov 26 2022, 3:38 PM
Parents
rGf93d92f43d98: pkgbase: report errors via metalog reader exit status
Branches
Unknown
Tags
Unknown