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

Commit 939c806b authored by Patrick Daly's avatar Patrick Daly
Browse files

msm: pil-q6v5: Handle undefined CONFIG_REGULATOR correctly



regulator_get() will return NULL if CONFIG_REGULATOR is defined. Handle
this value properly.

Change-Id: Iaaa8c6ddd91653349ddb107507bfb12e7e9418c8
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 86155e46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ struct q6v5_data *pil_q6v5_init(struct platform_device *pdev)
		return ERR_CAST(drv->vreg_cx);

	drv->vreg_pll = devm_regulator_get(&pdev->dev, "vdd_pll");
	if (!IS_ERR(drv->vreg_pll)) {
	if (!IS_ERR_OR_NULL(drv->vreg_pll)) {
		int voltage;
		ret = of_property_read_u32(pdev->dev.of_node, "qcom,vdd_pll",
					   &voltage);