[PATCH 2/2] OPP: ti: Use devm_pm_opp_set_config_regulators

From: Primoz Fiser
Date: Thu Jun 06 2024 - 07:33:49 EST


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.

Switch to using devm_pm_opp_set_config_regulators() function that
correctly handles return values and doesn't require us to handle
returned tokens.

Fixes: 6baee034cb55 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()")
Signed-off-by: Primoz Fiser <primoz.fiser@xxxxxxxxx>
---
drivers/opp/ti-opp-supply.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/opp/ti-opp-supply.c b/drivers/opp/ti-opp-supply.c
index e3b97cd1fbbf..8a4bcc5fb9dc 100644
--- a/drivers/opp/ti-opp-supply.c
+++ b/drivers/opp/ti-opp-supply.c
@@ -392,7 +392,7 @@ static int ti_opp_supply_probe(struct platform_device *pdev)
return ret;
}

- ret = dev_pm_opp_set_config_regulators(cpu_dev, ti_opp_config_regulators);
+ ret = devm_pm_opp_set_config_regulators(cpu_dev, ti_opp_config_regulators);
if (ret < 0)
_free_optimized_voltages(dev, &opp_data);

--
2.25.1