regulator: Fix memory leak in set_machine_constraints() error paths
authorAxel Lin <axel.lin@gmail.com>
Fri, 15 Jul 2011 02:50:43 +0000 (10:50 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Fri, 22 Jul 2011 10:43:59 +0000 (11:43 +0100)
commit1a6958e79f9e191c89fe0c13f7452b0bd8097050
treeb857e86f6ffe1e25a391059b153ac5f910e1ea3f
parent89f425ed5bf3d4fd97e840296dccd75b8e0fe4c9
regulator: Fix memory leak in set_machine_constraints() error paths

Properly kfree rdev->constraints in all set_machine_constraints() error paths.
Also properly kfree rdev->constraints in regulator_register() error paths.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c