summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorJiyu Yang <jiyu.yang@nxp.com>2020-10-22 22:17:16 +0800
committerXianzhong <xianzhong.li@nxp.com>2020-10-27 16:51:42 +0800
commit1e853b5e537da873beef448786f7efa8f93b727d (patch)
tree5c68751c7439837a1de89d0951e4ed8fa1fac717 /drivers/mxc
parent358efb2c0a4cafc17214caa6777e4de812516a8a (diff)
LF-2118-2 [#ccc] fixed Coverity Issue:6124050
[Solution] add Node null check [Problem]CID 6124050 (#8 of 8): Dereference after null check (FORWARD_NULL) 14. var_deref_op: Dereferencing null pointer Node Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
index ad6cd91cd7dd..b71328178a83 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
@@ -1349,7 +1349,7 @@ _ConvertPhysical(
physical -= Kernel->hardware->baseAddress;
/* 2G upper is virtual space, better to move to gckHARDWARE section. */
- if (physical + Node->Virtual.bytes > 0x80000000U)
+ if (Node && (physical + Node->Virtual.bytes > 0x80000000U))
{
/* End is above 2G, ie virtual space. */
status = gcvSTATUS_NOT_SUPPORTED;