]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Rely on regulator_dev_release to free constraints
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 26 Jan 2016 16:38:59 +0000 (16:38 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 27 Jan 2016 14:41:42 +0000 (14:41 +0000)
commit7a9ceef4bde7911d3c57b0544cec69644778fab2
tree5bbf8dd20e09a5d70feeb43e288a559dc72dee72
parentd7e15052ecc9ac4f938d1d7432c1d120a2711a7e
regulator: core: Rely on regulator_dev_release to free constraints

As we now free the constraints in regulator_dev_release we will still
call free on the constraints pointer even if we went down an error
path in regulator_register, because it is only allocated after the
device_register. As such we no longer need to free rdev->constraints
on the error paths, so this patch removes said frees.

Fixes: 63a93e8b6f03 ("regulator: core: Move more deallocation into class unregister")
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c