mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
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: Cheng Zeng <chenzeng@codeaurora.org>
This commit is contained in:
parent
ccad254cc1
commit
9e52c6925f
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue