drm: Fixup failure paths in drm_atomic_helper_set_config
authorDaniel Vetter <[email protected]>
Wed, 29 Mar 2017 17:41:36 +0000 (19:41 +0200)
committerDaniel Vetter <[email protected]>
Thu, 30 Mar 2017 07:36:29 +0000 (09:36 +0200)
I've screwed this up when removing the legacy backoff hack.

Fixes: 38b6441e4e75 ("drm/atomic-helper: Remove the backoff hack from set_config")
Cc: Harry Wentland <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/drm_atomic_helper.c

index c4538c5dbc97467bf27c43a27aa7d09b17bb5280..c3994b4d5f324702afbc06e4da10f76d93438fac 100644 (file)
@@ -2293,10 +2293,11 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
        state->acquire_ctx = ctx;
        ret = __drm_atomic_helper_set_config(set, state);
        if (ret != 0)
-               return ret;
+               goto fail;
 
        ret = drm_atomic_commit(state);
 
+fail:
        drm_atomic_state_put(state);
        return ret;
 }