Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da2a858f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm8952: use devm_regulator_get to correct regulator ref"

parents eaf2bd65 000d64a7
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2618,7 +2618,7 @@ int msm8952_init_wsa_switch_supply(struct platform_device *pdev,
		return -ENODEV;
	}

	pdata->wsa_switch_supply.supply = regulator_get(dev,
	pdata->wsa_switch_supply.supply = devm_regulator_get(dev,
			switch_supply_str);
	if (IS_ERR(pdata->wsa_switch_supply.supply)) {
		ret = PTR_ERR(pdata->wsa_switch_supply.supply);
@@ -2641,7 +2641,6 @@ int msm8952_init_wsa_switch_supply(struct platform_device *pdev,
	if (ret) {
		dev_err(dev, "Setting voltage failed for regulator %s err = %d\n",
			switch_supply_str, ret);
		regulator_put(pdata->wsa_switch_supply.supply);
		pdata->wsa_switch_supply.supply = NULL;
		return ret;
	}
@@ -2660,7 +2659,6 @@ int msm8952_init_wsa_switch_supply(struct platform_device *pdev,
	if (ret < 0) {
		dev_err(dev, "Setting current failed for regulator %s err = %d\n",
			switch_supply_str, ret);
		regulator_put(pdata->wsa_switch_supply.supply);
		pdata->wsa_switch_supply.supply = NULL;
		return ret;
	}