From: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu, 7 Dec 2023 19:34:38 +0000 (+0200) Subject: drm/i915: Drop NULL fb check from intel_fb_uses_dpt() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a599d302ae00917038777fad09107576375e2c95;p=linux.git drm/i915: Drop NULL fb check from intel_fb_uses_dpt() intel_fb_uses_dpt() should not be called with a NULL fb, so drop the check. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> --- diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c index 81316b21314dc..44ae6c1e1d46d 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.c +++ b/drivers/gpu/drm/i915/display/intel_fb.c @@ -771,7 +771,7 @@ bool intel_fb_modifier_uses_dpt(struct drm_i915_private *i915, u64 modifier) bool intel_fb_uses_dpt(const struct drm_framebuffer *fb) { - return fb && to_i915(fb->dev)->display.params.enable_dpt && + return to_i915(fb->dev)->display.params.enable_dpt && intel_fb_modifier_uses_dpt(to_i915(fb->dev), fb->modifier); }