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

Commit 47bd53f0 authored by Jani Nikula's avatar Jani Nikula Committed by Liam Girdwood
Browse files

regulator: fix unset_regulator_supplies() to remove all matches



Remove all matching consumer supplies, not just the first, to not leave
dangling pointers.

Signed-off-by: default avatarJani Nikula <ext-jani.1.nikula@nokia.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 23b5cc2a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1013,7 +1013,6 @@ static void unset_regulator_supplies(struct regulator_dev *rdev)
			list_del(&node->list);
			kfree(node->dev_name);
			kfree(node);
			return;
		}
	}
}