Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6432ea9 authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by Mark Brown
Browse files

regmap: Initialize `map->debugfs' before regcache



In the rbtree code we are exposing statistics relating to the
number of nodes/registers of the rbtree cache for each of the
devices.  Ensure that `map->debugfs' has been initialized before
we attempt to initialize the debugfs entry for the rbtree cache.

Signed-off-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
parent f6161aa1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -710,12 +710,12 @@ struct regmap *regmap_init(struct device *dev,
		}
	}

	regmap_debugfs_init(map, config->name);

	ret = regcache_init(map, config);
	if (ret != 0)
		goto err_range;

	regmap_debugfs_init(map, config->name);

	/* Add a devres resource for dev_get_regmap() */
	m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL);
	if (!m) {