Skip to content

Commit 3a1ac6b

Browse files
pfiservireshk
authored andcommitted
OPP: ti: Fix ti_opp_supply_probe wrong return values
Function ti_opp_supply_probe() since commit 6baee03 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()") returns wrong values when all goes well and hence driver probing eventually fails. Fixes: 6baee03 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()") Signed-off-by: Primoz Fiser <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 101388b commit 3a1ac6b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/opp/ti-opp-supply.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,12 @@ static int ti_opp_supply_probe(struct platform_device *pdev)
393393
}
394394

395395
ret = dev_pm_opp_set_config_regulators(cpu_dev, ti_opp_config_regulators);
396-
if (ret < 0)
396+
if (ret < 0) {
397397
_free_optimized_voltages(dev, &opp_data);
398+
return ret;
399+
}
398400

399-
return ret;
401+
return 0;
400402
}
401403

402404
static struct platform_driver ti_opp_supply_driver = {

0 commit comments

Comments
 (0)