From: Paulo Zanoni Date: Wed, 4 Nov 2015 19:10:47 +0000 (-0200) Subject: drm/i915: remove unnecessary check for crtc->primary->fb X-Git-Tag: v4.5-rc1~74^2~37^2~126 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a4dedd5a14a8910313b1b5d3f3e6cf0bb3e9d78c;p=karo-tx-linux.git drm/i915: remove unnecessary check for crtc->primary->fb We already check if the CRTC is visible, and it shouldn't be possible to have a visible CRTC without an FB. This was noticed by both Chris and Ville on different ocasions. Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1446664257-32012-4-git-send-email-paulo.r.zanoni@intel.com Signed-off-by: Maarten Lankhorst --- diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 72c336ffdd91..4a21435d459b 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -503,7 +503,7 @@ static struct drm_crtc *intel_fbc_find_crtc(struct drm_i915_private *dev_priv) break; } - if (!crtc || crtc->primary->fb == NULL) + if (!crtc) return NULL; return crtc;