Commit 84114990 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Remove check for !crtc_state in intel_plane_atomic_calc_changes()

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1467470166-31717-9-git-send-email-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
parent f1fda745
...@@ -11983,8 +11983,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, ...@@ -11983,8 +11983,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
struct drm_framebuffer *fb = plane_state->fb; struct drm_framebuffer *fb = plane_state->fb;
int ret; int ret;
if (crtc_state && INTEL_INFO(dev)->gen >= 9 && if (INTEL_GEN(dev) >= 9 && plane->type != DRM_PLANE_TYPE_CURSOR) {
plane->type != DRM_PLANE_TYPE_CURSOR) {
ret = skl_update_scaler_plane( ret = skl_update_scaler_plane(
to_intel_crtc_state(crtc_state), to_intel_crtc_state(crtc_state),
to_intel_plane_state(plane_state)); to_intel_plane_state(plane_state));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment