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

Commit fc1a4d02 authored by Govindaraj Rajagopal's avatar Govindaraj Rajagopal
Browse files

msm: vidc: Add conditional check to avoid invalid access



Added check to ensure valid vsfr pointer, to avoid invalid
access.

Change-Id: Ic6f558550620ccdc808b8d61511ce18a798a3524
Signed-off-by: default avatarGovindaraj Rajagopal <grajagop@codeaurora.org>
parent c434037e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1945,6 +1945,8 @@ static int __interface_queues_init(struct venus_hfi_device *dev)
		dev->sfr.align_virtual_addr = mem_addr->align_virtual_addr;
		dev->sfr.mem_size = ALIGNED_SFR_SIZE;
		dev->sfr.mem_data = mem_addr->mem_data;
		vsfr = (struct hfi_sfr_struct *) dev->sfr.align_virtual_addr;
		vsfr->bufSize = ALIGNED_SFR_SIZE;
	}

	q_tbl_hdr = (struct hfi_queue_table_header *)
@@ -2004,8 +2006,6 @@ static int __interface_queues_init(struct venus_hfi_device *dev)
		}
	}

	vsfr = (struct hfi_sfr_struct *) dev->sfr.align_virtual_addr;
	vsfr->bufSize = ALIGNED_SFR_SIZE;

	if (dev->res->domain_cvp) {
		rc = __interface_dsp_queues_init(dev);