[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1520017960-5120-1-git-send-email-festevam@gmail.com>
Date: Fri, 2 Mar 2018 16:12:40 -0300
From: Fabio Estevam <festevam@...il.com>
To: broonie@...nel.org
Cc: david@...hnology.com, linux-kernel@...r.kernel.org,
Fabio Estevam <fabio.estevam@....com>
Subject: [PATCH] regmap: debugfs: Do not print warning when no device is associated
From: Fabio Estevam <fabio.estevam@....com>
Commit 9b947a13e7f6 ("regmap: use debugfs even when no device")
allows the usage of regmap debugfs even when there is no device
associated, which causes several warnings like this:
(NULL device *): Failed to create debugfs directory
Do not print the warning in the case there is no associated device.
Signed-off-by: Fabio Estevam <fabio.estevam@....com>
---
drivers/base/regmap/regmap-debugfs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 7eb512b..db6141f 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -575,7 +575,9 @@ 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");
+ if (map->dev)
+ dev_warn(map->dev,
+ "Failed to create debugfs directory\n");
return;
}
--
2.7.4
Powered by blists - more mailing lists