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

Commit e2b99152 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: cvp: Fix to avoid cache entry for unwanted buffer"

parents a0a9a5d4 fa2c98ac
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -382,7 +382,11 @@ static struct msm_cvp_smem *msm_cvp_session_get_smem(struct msm_cvp_inst *inst,
		rc = msm_cvp_map_smem(inst, smem, "map cpu");
		if (rc)
			goto exit;

		if (buf->size > smem->size || buf->size > smem->size - buf->offset) {
			dprintk(CVP_ERR, "%s: invalid offset %d or size %d for a new entry\n",
				__func__, buf->offset, buf->size);
			goto exit2;
		}
		rc = msm_cvp_session_add_smem(inst, smem);
		if (rc && rc != -ENOMEM)
			goto exit2;