summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYang Rong <rong.r.yang@intel.com>2015-11-10 12:09:56 +0800
committerYang Rong <rong.r.yang@intel.com>2015-11-19 16:06:11 +0800
commit4c96950745270afc29b1981ec451bd800c173d2a (patch)
treec7daeb907441bbba5d3f1c652b703edb8d3a6b5e /src
parent7038329385f2553cdaad97f62d7d2e1233945679 (diff)
Runtime: return the correct error code in cl_event_check_waitlist.
Return CL_INVALID_CONTEXT if the context associated with command_queue and events in event_wait_list are not the same. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Luo Xionghu <xionghu.luo@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/cl_event.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cl_event.c b/src/cl_event.c
index bd4d7006..33916697 100644
--- a/src/cl_event.c
+++ b/src/cl_event.c
@@ -247,8 +247,10 @@ cl_int cl_event_check_waitlist(cl_uint num_events_in_wait_list,
}
if(event && event == &event_wait_list[i])
goto error;
- if(event_wait_list[i]->ctx != ctx)
- goto error;
+ if(event_wait_list[i]->ctx != ctx) {
+ err = CL_INVALID_CONTEXT;
+ goto exit;
+ }
}
exit: