diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 51db0f88f1646ec7646f0fa7770e8fd763d555a8..a4d3d41f52214544b6d17a9e2aac59908793fa05 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -707,6 +707,8 @@ struct regmap *__regmap_init(struct device *dev, } } + ret = -EINVAL; /* Later error paths rely on this */ + if (config->disable_locking) { map->lock = map->unlock = regmap_lock_unlock_none; map->can_sleep = config->can_sleep;