From: Rosen Penev Date: Sat, 28 Feb 2026 19:51:58 +0000 (-0800) Subject: kernel: bcma: fallback-sprom: check defered probe X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=04ed8c94ce928376ce980fbf51b525518953d82c;p=thirdparty%2Fopenwrt.git kernel: bcma: fallback-sprom: check defered probe When NVMEM is not ready, of_get_mac_address fails. Handle this. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/22305 Signed-off-by: Christian Marangi --- diff --git a/target/linux/generic/files/drivers/bcma/fallback-sprom.c b/target/linux/generic/files/drivers/bcma/fallback-sprom.c index 6932c3c8f57..4c361cc000e 100644 --- a/target/linux/generic/files/drivers/bcma/fallback-sprom.c +++ b/target/linux/generic/files/drivers/bcma/fallback-sprom.c @@ -479,6 +479,7 @@ static int bcma_fbs_probe(struct platform_device *pdev) struct bcma_fbs *priv; unsigned long flags; u8 mac[ETH_ALEN]; + int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -491,7 +492,10 @@ static int bcma_fbs_probe(struct platform_device *pdev) of_property_read_u32(node, "pci-bus", &priv->pci_bus); of_property_read_u32(node, "pci-dev", &priv->pci_dev); - of_get_mac_address(node, mac); + ret = of_get_mac_address(node, mac); + if (ret == -EPROBE_DEFER) + return ret; + if (is_valid_ether_addr(mac)) { dev_info(dev, "mtd mac %pM\n", mac); } else {