UPSTREAM: 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)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 6 Mar 2017 10:28:40 +0000 (18:28 +0800)
commit8b8b946452098631775c333a3c32de3be25fc68a
tree0d6190adb74a50a493034f733ad8a125920025cf
parent29fa20a202a4e6d5e3ed3273c0a813120e9f3e10
UPSTREAM: 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: 29f5f4860a8e ("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>
(cherry picked from commit 6333ef46bbe514a8ece6c432aab6bcf8637b2d7c)

Change-Id: I731b81e175ef9fb519e2090590f5e7c081f748a2
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/regulator/core.c