Re: [PATCH v5 phy-next 01/16] phy: lynx-28g: avoid returning NULL in of_xlate() function
From: Ioana Ciornei
Date: Thu Jun 11 2026 - 06:50:17 EST
On Wed, Jun 10, 2026 at 06:19:37PM +0300, Vladimir Oltean wrote:
> Sashiko points out that _of_phy_get() does not support a NULL returned
> output from phy_provider->of_xlate(), just a valid pointer or a
> pointer-encoded error.
>
> When lynx_28g_probe() -> for_each_available_child_of_node() skips
> over lanes which have OF nodes with status = "disabled", the
> priv->lane[idx].phy pointer will remain NULL.
>
> This NULL pointer may be propagated to lynx_28g_xlate() if the device
> tree contains a phandle to the disabled lane AND fw_devlink did not
> block probing for the consumer. In that case, the PHY core will crash
> when trying to dereference the NULL phy pointer.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Reviewed-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>