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

Commit a034cd26 authored by Harshavardhan Reddy's avatar Harshavardhan Reddy Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Fix null pointer dereference in hfi



Add NULL condition check to avoid NULL derefernce
in receive_ack_cmd.

Change-Id: Ic5f279373619b52acf86c812cb03903913d0a909
Signed-off-by: default avatarHarshavardhan Reddy <hpamal@codeaurora.org>
parent 6fb71d5e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -251,6 +251,9 @@ static void receive_ack_cmd(struct gmu_device *gmu, void *rcvd,
	uint32_t req_hdr = ack[1];
	struct kgsl_hfi *hfi = &gmu->hfi;

	if (ret_cmd == NULL)
		return;

	trace_kgsl_hfi_receive(MSG_HDR_GET_ID(req_hdr),
		MSG_HDR_GET_SIZE(req_hdr),
		MSG_HDR_GET_SEQNUM(req_hdr));