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

Commit 8b482a3f authored by E V Ravi's avatar E V Ravi
Browse files

ais: cam_soc_api: Moved the Debug statement to the if-condition



Debug statement is dereferencing a pointer with vdd_info[i]->vdd
Though it is debug statement, it might dereference a null pointer.

Change-Id: Id2c3bb9ccc6ed6d23d7da54bb3b4364009ebb1aa
Signed-off-by: default avatarE V Ravi <evenka@codeaurora.org>
parent cc0e9149
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -670,10 +670,11 @@ void msm_camera_put_regulators(struct platform_device *pdev,
	}

	for (i = cnt - 1; i >= 0; i--) {
		if (vdd_info[i] && !IS_ERR_OR_NULL(vdd_info[i]->vdd))
		if (vdd_info[i] && !IS_ERR_OR_NULL(vdd_info[i]->vdd)) {
			devm_regulator_put(vdd_info[i]->vdd);
			CDBG("vdd ptr[%d] :%pK\n", i, vdd_info[i]->vdd);
		}
	}

	devm_kfree(&pdev->dev, *vdd_info);
	*vdd_info = NULL;