public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OPP: ti: Fix ti_opp_supply_probe wrong return values
@ 2024-06-06  7:01 Primoz Fiser
  2024-06-06  8:59 ` Viresh Kumar
  2024-06-11  5:29 ` Viresh Kumar
  0 siblings, 2 replies; 8+ messages in thread
From: Primoz Fiser @ 2024-06-06  7:01 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, linux-pm,
	linux-kernel; +Cc: upstream

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>
---
 drivers/opp/ti-opp-supply.c | 6 ++++--
 1 file 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 = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-11  5:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06  7:01 [PATCH] OPP: ti: Fix ti_opp_supply_probe wrong return values Primoz Fiser
2024-06-06  8:59 ` Viresh Kumar
2024-06-06  9:43   ` Primoz Fiser
2024-06-06  9:48     ` Viresh Kumar
2024-06-06 10:34       ` Primoz Fiser
2024-06-06 10:58         ` Viresh Kumar
2024-06-06 11:35           ` Primoz Fiser
2024-06-11  5:29 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox