[Intel-gfx] [PATCH 4/8] Critical KlockWork Error - Fixes - intel_display.c - Possible NullPointerDereference1

Nischal Varide nischal.varide at intel.com
Fri Aug 14 02:49:46 UTC 2020


---
 drivers/gpu/drm/i915/display/intel_display.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 2ddabf92adde..30d189094e97 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -2265,9 +2265,9 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
 	pinctl = 0;
 	if (HAS_GMCH(dev_priv))
 		pinctl |= PIN_MAPPABLE;
-
-	vma = i915_gem_object_pin_to_display_plane(obj,
-						   alignment, view, pinctl);
+	if (obj)
+	    vma = i915_gem_object_pin_to_display_plane(obj,
+		    alignment, view, pinctl);
 	if (IS_ERR(vma))
 		goto err;
 
-- 
2.26.0



More information about the Intel-gfx mailing list