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

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


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>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
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 c84f5ceb015a..87b562e49a43 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -583,7 +583,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);

kfree(map->debugfs_name);
map->debugfs_name = NULL;
--
2.16.2