]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dpaa: Account for MDIO device not being found
authorJustin Hibbits <jhibbits@FreeBSD.org>
Sat, 26 Nov 2022 15:38:13 +0000 (10:38 -0500)
committerJustin Hibbits <jhibbits@FreeBSD.org>
Sat, 26 Nov 2022 15:55:21 +0000 (10:55 -0500)
commit21d5b592faa1cd71c201acfb2686b79e0bbba9f7
tree30b683b30553918a8bd5d470827437b3d776cf31
parentf93d92f43d984c1d927c7c12d06ae1497d12deea
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.
sys/dev/dpaa/if_dtsec_fdt.c