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 |
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;