Commit 3a1ac6b8 authored by Primoz Fiser's avatar Primoz Fiser Committed by Viresh Kumar
Browse files

OPP: ti: Fix ti_opp_supply_probe wrong return values



Function ti_opp_supply_probe() since commit 6baee034 ("OPP: ti:
Migrate to dev_pm_opp_set_config_regulators()") returns wrong values
when all goes well and hence driver probing eventually fails.

Fixes: 6baee034 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()")
Signed-off-by: default avatarPrimoz Fiser <primoz.fiser@norik.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 101388b8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -393,12 +393,14 @@ 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 0;
}

static struct platform_driver ti_opp_supply_driver = {
	.probe = ti_opp_supply_probe,
	.driver = {