Skip to contentSkip to conversation

mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up

PATCH Applied Rafał Miłecki 4 participants 4 messages Jul 19, 2023 – Jul 27, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 39661e23d7d4..03764b589ec5 100644
@@ -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/
Acked-by on v2 1/1
#1 lore raw
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.

Signature · 1 line
Florian

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Acked-by on v2 1/1
#2 lore raw
In reply to Rafał Miłecki
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.

---
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 +0 -0
index 39661e23d7d4..03764b589ec5 100644

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/

maintainer Applied
#3 lore raw
In reply to Rafał Miłecki
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.

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/