mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] of: deep-probe: replace BUG() with more verbose panic()
@ 2022-03-02 20:08 Ahmad Fatoum
  2022-03-03 10:05 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-03-02 20:08 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

In the case, we do hit this bug, the node name can be helpful, so
print it out.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 drivers/of/platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 0e718469dbcd..9b487cbb0c68 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -422,7 +422,9 @@ int of_device_ensure_probed(struct device_node *np)
 	if (IS_ERR(dev))
 		return PTR_ERR(dev);
 
-	BUG_ON(!dev);
+	if (!dev)
+		panic("deep-probe: device for '%s' couldn't be created\n",
+			 np->full_name);
 
 	/*
 	 * The deep-probe mechanism relies on the fact that all necessary
-- 
2.34.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-03 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 20:08 [PATCH] of: deep-probe: replace BUG() with more verbose panic() Ahmad Fatoum
2022-03-03 10:05 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox