summaryrefslogtreecommitdiff
path: root/drivers/opp
diff options
context:
space:
mode:
authorPrimoz Fiser <primoz.fiser@norik.com>2024-06-06 09:01:27 +0200
committerViresh Kumar <viresh.kumar@linaro.org>2024-06-11 10:58:48 +0530
commit3a1ac6b8f603a9310274990a0ad563a5fb709f59 (patch)
tree9849365c1af74a278412ebc30a16ee704372fc9a /drivers/opp
parent101388b8ef1027be72e399beeb97293cce67bb24 (diff)
OPP: ti: Fix ti_opp_supply_probe wrong return values
Function ti_opp_supply_probe() since commit 6baee034cb55 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()") returns wrong values when all goes well and hence driver probing eventually fails. Fixes: 6baee034cb55 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()") Signed-off-by: Primoz Fiser <primoz.fiser@norik.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp')
-rw-r--r--drivers/opp/ti-opp-supply.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/opp/ti-opp-supply.c b/drivers/opp/ti-opp-supply.c
index e3b97cd1fbbf..ec0056a4bb13 100644
--- a/drivers/opp/ti-opp-supply.c
+++ b/drivers/opp/ti-opp-supply.c
@@ -393,10 +393,12 @@ static int ti_opp_supply_probe(struct platform_device *pdev)
}
ret = dev_pm_opp_set_config_regulators(cpu_dev, ti_opp_config_regulators);
- if (ret < 0)
+ if (ret < 0) {
_free_optimized_voltages(dev, &opp_data);
+ return ret;
+ }
- return ret;
+ return 0;
}
static struct platform_driver ti_opp_supply_driver = {