[PATCH] regmap: debugfs: Improve warning message on debugfs_create_dir() failure

From: Fabio Estevam
Date: Mon Mar 05 2018 - 21:13:20 EST


From: Fabio Estevam <fabio.estevam@xxxxxxx>

Currently when debugfs_create_dir() fails we receive a warning message
that provides no indication as to what was the directory entry that
failed to be created.

Improve the warning message by printing the directory name that failed
in order to help debugging.

Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxx>
---
drivers/base/regmap/regmap-debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index e3e7b91..68f21d6 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -581,7 +581,8 @@ void regmap_debugfs_init(struct regmap *map, const char *name)

map->debugfs = debugfs_create_dir(name, regmap_debugfs_root);
if (!map->debugfs) {
- dev_warn(map->dev, "Failed to create debugfs directory\n");
+ dev_warn(map->dev,
+ "Failed to create %s debugfs directory\n", name);
return;
}

--
2.7.4