diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 21a2b28ab0ca..f6ca2098cc01 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4249,6 +4249,9 @@ int regulator_sync_voltage(struct regulator *regulator) struct regulator_voltage *voltage = ®ulator->voltage[PM_SUSPEND_ON]; int ret, min_uV, max_uV; + if (!regulator_ops_is_valid(rdev, REGULATOR_CHANGE_VOLTAGE)) + return 0; + regulator_lock(rdev); if (!rdev->desc->ops->set_voltage &&