From 6d4f367f91dfaf9ea235f9fef25afb04de008c86 Mon Sep 17 00:00:00 2001 From: Ahmed El-Shafiey Date: Sat, 27 Apr 2013 15:01:53 -0800 Subject: fixing broken opencl regression from last regression (when the CreateKernel does not specify error pointer) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15970] --- libopencl/opencl_runtime_api.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libopencl') diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc index 4d9e380..a171a24 100644 --- a/libopencl/opencl_runtime_api.cc +++ b/libopencl/opencl_runtime_api.cc @@ -598,7 +598,7 @@ cl_kernel _cl_program::CreateKernel( const char *kernel_name, cl_int *errcode_re setErrCode( errcode_ret, CL_INVALID_PROGRAM_EXECUTABLE ); else{ result = new _cl_kernel(this,kernel_name,finfo); - *errcode_ret = CL_SUCCESS; + setErrCode( errcode_ret, CL_SUCCESS ); } return result; } @@ -690,6 +690,7 @@ clCreateContextFromType(const cl_context_properties * properties, printf("GPGPU-Sim OpenCL API: unsupported device type %lx\n", device_type ); setErrCode( errcode_ret, CL_DEVICE_NOT_FOUND ); return NULL; + break; } if( properties != NULL ) { -- cgit v1.3