Re: [PATCH] phy: berlin-sata: count available child nodes

From: Manivannan Sadhasivam

Date: Fri Nov 27 2026 - 10:43:05 EST


On 2026-11-19 16:15 +0800, Wang Haoran wrote:
> phy_berlin_sata_probe() sizes priv->nphys with of_get_child_count(), which
> counts every child, but fills priv->phys[] only from available children. A
> disabled child therefore leaves trailing NULL entries, and
> phy_berlin_sata_phy_xlate() dereferences priv->phys[i]->index for them. A
> device tree that disables a PHY but still points a consumer at it crashes
> with a NULL dereference in the generic ahci_platform path during probe.
>
> Count available children instead.
>
> Signed-off-by: Wang Haoran <wanghr2026@xxxxxxxxxxxxxxxxxx>
> Fixes: 942a31b52191 ("phy: add a driver for the Berlin SATA PHY")

This isn't how a patch should be formated. Please read:
Documentation/process/5.Posting.rst

- Mani