Merge "msm: ipa3: Fix null pointer dereference error"

This commit is contained in:
qctecmdr 2021-09-27 02:06:44 -07:00 • committed by Gerrit - the friendly Code Review server
commit 08b7be4f68

View file

@ -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));