mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up
PATCH v2 1/1 mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up
From: Rafał Miłecki <[email protected]>
MTD subsystem may return -EPROBE_DEFER if something isn't ready yet. It's important to pass that error up so device will get probed later.
---
V2: Add of_node_put() - thanks Miquel!
--- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mtd/nand/raw/brcmnand/brcmnand.c +4 -0
@@ -3245,6 +3245,10 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc) ret =brcmnand_init_cs (host,NULL );if (ret) { +if (ret == -EPROBE_DEFER ) { +of_node_put (child); + goto err; + }devm_kfree (dev, host);continue ;/* Try all chip-selects */ }
Signature · 6 lines
2.35.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 6 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
MTD subsystem may return -EPROBE_DEFER if something isn't ready yet. It's important to pass that error up so device will get probed later.
Signed-off-by Rafał Miłecki <[email protected]>
Signature · 1 line
Florian
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 18 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
MTD subsystem may return -EPROBE_DEFER if something isn't ready yet. It's important to pass that error up so device will get probed later.
Signed-off-by Rafał Miłecki <[email protected]>---
V2: Addof_node_put()- thanks Miquel!--- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mtd/nand/raw/brcmnand/brcmnand.c +0
-0
drivers/mtd/nand/raw/brcmnand/brcmnand.c int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc) · line 3254
Quoted 10 lines
drivers/mtd/nand/raw/brcmnand/brcmnand.c +4
-0@@ -3245,6 +3245,10 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc) ret =brcmnand_init_cs (host,NULL );if (ret) { +if (ret == -EPROBE_DEFER ) { +of_node_put (child); + goto err; + }devm_kfree (dev, host);continue ;/* Try all chip-selects */ }
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 8 lines · On Wed, 2023-07-19 at 08:43:24 UTC, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= wrote:
From: Rafał Miłecki <[email protected]>
MTD subsystem may return -EPROBE_DEFER if something isn't ready yet. It's important to pass that error up so device will get probed later.
Signed-off-by Rafał Miłecki <[email protected]>Acked-by Florian Fainelli <[email protected]>Acked-by William Zhang <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/