[Intel-gfx] [PATCH 9/9] drm/i915: Remove check for !crtc_state in intel_plane_atomic_calc_changes()
Chris Wilson
chris at chris-wilson.co.uk
Sat Jul 2 14:36:06 UTC 2016
smatch spotted that:
drivers/gpu/drm/i915/intel_display.c:11986
intel_plane_atomic_calc_changes() warn: variable dereferenced before
check 'crtc_state' (see line 11972)
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_display.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f52cf4edf397..0ee707ef8beb 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11983,8 +11983,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
struct drm_framebuffer *fb = plane_state->fb;
int ret;
- if (crtc_state && INTEL_INFO(dev)->gen >= 9 &&
- plane->type != DRM_PLANE_TYPE_CURSOR) {
+ if (INTEL_GEN(dev) >= 9 && plane->type != DRM_PLANE_TYPE_CURSOR) {
ret = skl_update_scaler_plane(
to_intel_crtc_state(crtc_state),
to_intel_plane_state(plane_state));
--
2.8.1
More information about the Intel-gfx
mailing list