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

Commit 26daf73c authored by Ramesh V's avatar Ramesh V
Browse files

msm: camera: handle error check in case of invalid context bank



In case of invalid context bank from smmu then no need to setup context
bank simply return error.

Change-Id: I9f7866ccbd4a5446f42671dd376d932aa4d11060
Signed-off-by: default avatarRamesh V <ramev@codeaurora.org>
parent 84a40fce
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1513,6 +1513,12 @@ static int cam_populate_smmu_context_banks(struct device *dev,
	/* set up the iommu mapping for the  context bank */
	if (type == CAM_QSMMU) {
		ctx = msm_iommu_get_ctx(cb->name);
		if (IS_ERR_OR_NULL(ctx)) {
			rc = PTR_ERR(ctx);
			pr_err("Invalid pointer of ctx : %s rc = %d\n",
				 cb->name, rc);
			return -EINVAL;
		}
		CDBG("getting QSMMU ctx : %s\n", cb->name);
	} else {
		ctx = dev;