[libdrm,04/17] intel: error out on has_error in exec2
diff mbox

Message ID 1440434060-31347-4-git-send-email-emil.l.velikov@gmail.com
State New
Headers show

Commit Message

Emil Velikov Aug. 24, 2015, 4:34 p.m. UTC
Just like we do for the original exec()

Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/intel_bufmgr_gem.c | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index cf55a53..5287419 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2190,6 +2190,9 @@  do_exec2(drm_intel_bo *bo, int used, drm_intel_context *ctx,
 	int ret = 0;
 	int i;
 
+	if (bo_gem->has_error)
+		return -ENOMEM;
+
 	switch (flags & 0x7) {
 	default:
 		return -EINVAL;