mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
UPSTREAM: regulator: Remove unneded check for regulator supply
The regulator_resolve_supply() function checks if a supply has been
associated with a regulator to avoid enabling it if that is not the
case.
But the supply was already looked up with regulator_resolve_supply()
and set with set_supply() before the check and both return on error.
So the fact that this statement has been reached means that neither
of them failed and a supply must be associated with the regulator.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 95a293c7ba)
Change-Id: Ib4738ae3f733256a2ba794543430ffde2c434352
Signed-off-by: David Wu <david.wu@rock-chips.com>
This commit is contained in:
committed by
Huang, Tao
parent
dadb18764c
commit
98543f90ac
@@ -1530,7 +1530,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
|
||||
}
|
||||
|
||||
/* Cascade always-on state to supply */
|
||||
if (_regulator_is_enabled(rdev) && rdev->supply) {
|
||||
if (_regulator_is_enabled(rdev)) {
|
||||
ret = regulator_enable(rdev->supply);
|
||||
if (ret < 0) {
|
||||
_regulator_put(rdev->supply);
|
||||
|
||||
Reference in New Issue
Block a user