public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/atomic: free state in atomic ioctl if atomic commit failed
@ 2015-06-25  9:25 Liu, Hong
  2015-06-25  9:56 ` Maarten Lankhorst
  0 siblings, 1 reply; 3+ messages in thread
From: Liu, Hong @ 2015-06-25  9:25 UTC (permalink / raw)
  To: intel-gfx@lists.freedesktop.org

atomic commit only frees the state if no error met, caller needs to
free the allocated state if atomic commit failed.

Signed-off-by: Hong Liu <hong.liu@intel.com>
---
 drivers/gpu/drm/drm_atomic.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 6e3b78e..aa8ad4c 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1344,6 +1344,9 @@ retry:
 		}
 	}
 
+	if (ret && !(arg->flags & DRM_MODE_ATOMIC_TEST_ONLY))
+		goto fail;
+
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);
 
-- 
1.7.9.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-26  0:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25  9:25 [PATCH] drm/atomic: free state in atomic ioctl if atomic commit failed Liu, Hong
2015-06-25  9:56 ` Maarten Lankhorst
2015-06-26  0:27   ` Liu, Hong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox