diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2022-03-02 21:08:01 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-03-08 09:57:59 +0100 |
commit | bdd69720eee1b91d7a335e5b53deb3fc255a7647 (patch) | |
tree | 1ba7ba143442d23952e3462c4090440a84cc4db6 /drivers/of | |
parent | 94fd8cc0207f392174664e682394af76220899a6 (diff) | |
download | barebox-bdd69720eee1b91d7a335e5b53deb3fc255a7647.tar.gz barebox-bdd69720eee1b91d7a335e5b53deb3fc255a7647.tar.xz |
of: deep-probe: replace BUG() with more verbose panic()
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>
Link: https://lore.barebox.org/20220302200801.657501-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/platform.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 0e718469db..9b487cbb0c 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 |