regmap: debugfs: Improve warning message on debugfs_create_dir() failure

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@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Fabio Estevam 2018-03-05 23:13:04 -03:00 committed by Mark Brown
parent 17cf46cfe9
commit 59dd2a8504
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -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;