diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d5d648030af0..1375f53cdc95 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9860,10 +9860,8 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector, fail: intel_crtc->new_enabled = crtc->state->enable; fail_unlock: - if (state) { - drm_atomic_state_free(state); - state = NULL; - } + drm_atomic_state_free(state); + state = NULL; if (ret == -EDEADLK) { drm_modeset_backoff(ctx); @@ -13003,8 +13001,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set) } out_config: - if (state) - drm_atomic_state_free(state); + drm_atomic_state_free(state); intel_set_config_free(config); return ret;