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

Commit 60dc58a6 authored by Ravindranath Thiyagarajan's avatar Ravindranath Thiyagarajan Committed by Tirupathi Reddy
Browse files

regulator: cpr_regulator: Use devm_regulator_get_optional for vdd_apc



devm_regulator_get returns a dummy regulator handle if the required
regulator is not found. Instead use devm_regulator_get_optional to
parse through list of vdd_apc regulator names.

Change-Id: I081a6e2579cc3db9d9d7c779cc12ca06fa418fd7
Signed-off-by: default avatarRavindranath Thiyagarajan <rthiyaga@codeaurora.org>
parent 2a3d03a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1785,7 +1785,7 @@ static int cpr_apc_init(struct platform_device *pdev,
	int i, rc = 0;

	for (i = 0; i < ARRAY_SIZE(vdd_apc_name); i++) {
		cpr_vreg->vdd_apc = devm_regulator_get(&pdev->dev,
		cpr_vreg->vdd_apc = devm_regulator_get_optional(&pdev->dev,
					vdd_apc_name[i]);
		rc = PTR_RET(cpr_vreg->vdd_apc);
		if (!IS_ERR_OR_NULL(cpr_vreg->vdd_apc))