touch dpt_vma->node only if dpt-vma is not NULL

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com>
Reviewed-by: Jouni Högander <jouni.hogan...@intel.com>
---
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c 
b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 39499a0ec6c0..f5c77a018e10 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -1006,7 +1006,8 @@ static u32 skl_surf_address(const struct 
intel_plane_state *plane_state,
                 * The DPT object contains only one vma, so the VMA's offset
                 * within the DPT is always 0.
                 */
-               drm_WARN_ON(&i915->drm, plane_state->dpt_vma->node.start);
+               drm_WARN_ON(&i915->drm, plane_state->dpt_vma &&
+                           plane_state->dpt_vma->node.start);
                drm_WARN_ON(&i915->drm, offset & 0x1fffff);
                return offset >> 9;
        } else {
-- 
2.25.1

Reply via email to