drm/i915: Fix atomic state leak when resetting HDMI link
authorJosé Roberto de Souza <jose.souza@intel.com>
Sat, 2 Mar 2019 00:33:47 +0000 (16:33 -0800)
committerJosé Roberto de Souza <jose.souza@intel.com>
Mon, 4 Mar 2019 22:41:58 +0000 (14:41 -0800)
Atomic state needs to be put even if the commit was successful.

Fixes: dba14b27dd3c ("drm/i915: Reinitialize sink scrambling/TMDS clock ratio on HPD")
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190302003349.19189-1-jose.souza@intel.com
drivers/gpu/drm/i915/intel_ddi.c

index d918be927fc2f62b967662a887d82eada43319b5..34dd5823398aadf7bcd3d2e71652717f692e1924 100644 (file)
@@ -3984,12 +3984,7 @@ static int modeset_pipe(struct drm_crtc *crtc,
                goto out;
 
        ret = drm_atomic_commit(state);
-       if (ret)
-               goto out;
-
-       return 0;
-
- out:
+out:
        drm_atomic_state_put(state);
 
        return ret;