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

Commit 891636ea authored by Mark Brown's avatar Mark Brown
Browse files

regulator: core: Drop references on supply regulator when unregistering



Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent dc9ceed6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3740,8 +3740,11 @@ void regulator_unregister(struct regulator_dev *rdev)
	if (rdev == NULL)
		return;

	if (rdev->supply)
	if (rdev->supply) {
		while (rdev->use_count--)
			regulator_disable(rdev->supply);
		regulator_put(rdev->supply);
	}
	mutex_lock(&regulator_list_mutex);
	debugfs_remove_recursive(rdev->debugfs);
	flush_work(&rdev->disable_work.work);