drm/xe: Fix NPD in ggtt_node_remove()
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Wed, 28 Aug 2024 09:22:29 +0000 (14:52 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 28 Aug 2024 17:15:40 +0000 (13:15 -0400)
commitc72084163cd22ebf59d936669ec25b1fc2b7494c
tree38419674d6ad72fe318230e67da9d356de3cf97a
parent379cad69bdfe522e840ed5f5c01ac8769006d53e
drm/xe: Fix NPD in ggtt_node_remove()

Make sure that ggtt_node_remove() is invoked only if both node and ggtt
are not null. Move the null checks to the caller function
xe_ggtt_node_remove().

v2: Move null check below declarations (Tejas)

Fixes: 919bb54e989c ("drm/xe: Fix missing runtime outer protection for ggtt_remove_node")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240828092229.3606503-1-himal.prasad.ghimiray@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_ggtt.c