diff mbox series

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

Message ID 20200814024950.26830-4-nischal.varide@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/8] Critical KlockWork Error - Fixes - intel_cdclk.c - Possible NullPointerDereference1 | expand

Commit Message

Nischal Varide Aug. 14, 2020, 2:49 a.m. UTC
---
 drivers/gpu/drm/i915/display/intel_display.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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;