From: "Liu, Hong" <hong.liu@intel.com>
To: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: [PATCH] drm/atomic: free state in atomic ioctl if atomic commit failed
Date: Thu, 25 Jun 2015 09:25:58 +0000 [thread overview]
Message-ID: <1435224383.20491.6.camel@intel.com> (raw)
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
next reply other threads:[~2015-06-25 9:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 9:25 Liu, Hong [this message]
2015-06-25 9:56 ` [PATCH] drm/atomic: free state in atomic ioctl if atomic commit failed Maarten Lankhorst
2015-06-26 0:27 ` Liu, Hong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435224383.20491.6.camel@intel.com \
--to=hong.liu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.