Skip to contentSkip to conversation

drm/atomic: put state on error path

PATCH In review Pan Bian 2 participants 2 messages Jan 19, 2021 – Jan 21, 2021

Subsystems (2)
lore
Share & tools
lore

Pan Bian

author
#0 lore raw

PATCH 1/1 drm/atomic: put state on error path

Put the state before returning error code.

Fixes 44596b8c4750 ("drm/atomic: Unify conflicting encoder handling.")
---
 drivers/gpu/drm/drm_atomic_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +1 -1
index ba1507036f26..4a8cbec832bc 100644
@@ -3021,7 +3021,7 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
 
 	ret = handle_conflicting_encoders(state, true);
 	if (ret)
-		return ret;
+		goto fail;
 
 	ret = drm_atomic_commit(state);
 
Signature · 7 lines
2.17.1


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 5 lines · Pan Bian

Put the state before returning error code.

Fixes 44596b8c4750 ("drm/atomic: Unify conflicting encoder handling.")

Nice catch, patch merged to drm-misc-fixes with cc: stable. -Daniel

Quoted 21 lines
---
 drivers/gpu/drm/drm_atomic_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +1 -1
index ba1507036f26..4a8cbec832bc 100644
@@ -3021,7 +3021,7 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
 
 	ret = handle_conflicting_encoders(state, true);
 	if (ret)
-		return ret;
+		goto fail;
 
 	ret = drm_atomic_commit(state);
 
Signature · 1 line
2.17.1
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel