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

Commit e030a143 authored by Vaibhav Deshu Venkatesh's avatar Vaibhav Deshu Venkatesh
Browse files

msm: vidc: Remove unnecessary checks in set property



Set property payload can be NULL in cases like requesting
I-Frame. Hence, erroring out if this payload is NULL is
not correct. Instead add a NULL check before memcopy of
payload.

CRs-Fixed: 2368458
Change-Id: Ia7ec9c20affd232109104147c450d293941c79b9
Signed-off-by: default avatarVaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
parent f5f31790
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -782,7 +782,7 @@ int create_pkt_cmd_session_set_property(
	pkt->num_properties = 1;
	pkt->size += size;
	pkt->rg_property_data[0] = ptype;
	if (size)
	if (size && pdata)
		memcpy(&pkt->rg_property_data[1], pdata, size);

	dprintk(VIDC_DBG, "Setting HAL Property = 0x%x\n", ptype);
+1 −1
Original line number Diff line number Diff line
@@ -2258,7 +2258,7 @@ static int venus_hfi_session_set_property(void *sess,
	struct venus_hfi_device *device;
	int rc = 0;

	if (!session || !session->device || !pdata) {
	if (!session || !session->device) {
		dprintk(VIDC_ERR, "Invalid Params\n");
		return -EINVAL;
	}