diff mbox series

mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing

Message ID 20240115141245.3415035-2-u.kleine-koenig@pengutronix.de
State New
Headers show
Series mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing | expand

Commit Message

Uwe Kleine-König Jan. 15, 2024, 2:12 p.m. UTC
If during probe fsl_lbc_ctrl_dev is NULL that might just be because the
fsl_lbc driver didn't bind yet. So return -EPROBE_DEFER in this case to
make the driver core retry probing later.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/mtd/nand/raw/fsl_elbc_nand.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Miquel Raynal Feb. 5, 2024, 2:49 p.m. UTC | #1
Hi Uwe,

u.kleine-koenig@pengutronix.de wrote on Mon, 15 Jan 2024 15:12:46 +0100:

> If during probe fsl_lbc_ctrl_dev is NULL that might just be because the
> fsl_lbc driver didn't bind yet. So return -EPROBE_DEFER in this case to
> make the driver core retry probing later.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Applied to nand/next, thanks!

Miquèl
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c
index 1e3a80f06f33..df6a0d5c86bb 100644
--- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
@@ -869,7 +869,8 @@  static int fsl_elbc_nand_probe(struct platform_device *pdev)
 	struct mtd_info *mtd;
 
 	if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs)
-		return -ENODEV;
+		return dev_err_probe(&pdev->dev, -EPROBE_DEFER, "lbc_ctrl_dev missing\n");
+
 	lbc = fsl_lbc_ctrl_dev->regs;
 	dev = fsl_lbc_ctrl_dev->dev;