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

Commit 9e52c692 authored by Cheng Zeng's avatar Cheng Zeng
Browse files

msm: ipa3: Fix null pointer dereference error



If smmu is not enabled, smmu context device check
was missing before accessing it which was resulting
in null pointer dereference. Now adding check
before accessing it.

Change-Id: I94393524c79847a165ba605d34906525640b359a
Signed-off-by: default avatarCheng Zeng <chenzeng@codeaurora.org>
parent ccad254c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static int ipa3_nat_ipv6ct_mmap(
	/*
	 * Check if no smmu or non dma coherent
	 */
	if (!cb->valid || !dev_is_dma_coherent(cb->dev)) {
	if (cb && cb->dev && (!cb->valid || !dev_is_dma_coherent(cb->dev))) {

		IPADBG("Either smmu valid=%u and/or DMA coherent=%u false\n",
			   cb->valid, !dev_is_dma_coherent(cb->dev));