Hi Mark,

On Thu, Mar 1, 2018 at 9:27 PM, Fabio Estevam <feste...@gmail.com> wrote:
> Hi Mark,
>
> On Thu, Mar 1, 2018 at 3:24 PM, Mark Brown <broo...@kernel.org> wrote:
>
>> Is this triggered by 9b947a13e7f6017f18 (regmap: use debugfs even when
>> no device)?
>
> Yes, exactly. If I revert this commit the warnings are gone.
>
> Should I send a revert or is there another way to solve it?

Does the change below look good?

diff --git a/drivers/base/regmap/regmap-debugfs.c
b/drivers/base/regmap/regmap-debugfs.c
index 7eb512b..018d3a2 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -575,7 +575,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");
+               if (map->dev)
+                       dev_warn(map->dev, "Failed to create debugfs
directory\n");
                return;
        }

Reply via email to