Skip to contentSkip to conversation

devres: show which resource was invalid

PATCH New Ben Dooks 1 participant 1 message Jul 8, 2022 Library code

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 devres: show which resource was invalid

If we do find a resouce that's not valid, print it to aid identifying the issue.

---
 lib/devres.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/devres.c +1 -1
index 14664bbb4875..df5ed06908f0 100644
@@ -143,7 +143,7 @@ __devm_ioremap_resource(struct device *dev, const struct resource *res,
 	BUG_ON(!dev);
 
 	if (!res || resource_type(res) != IORESOURCE_MEM) {
-		dev_err(dev, "invalid resource\n");
+		dev_err(dev, "invalid resource (%pR)\n", res);
 		return IOMEM_ERR_PTR(-EINVAL);
 	}
 
Signature · 1 line
2.35.1