diff --git a/src/detection/opencl/opencl.c b/src/detection/opencl/opencl.c index 3432665d4..17dfabc88 100644 --- a/src/detection/opencl/opencl.c +++ b/src/detection/opencl/opencl.c @@ -60,7 +60,8 @@ static const char* openCLHandleData(OpenCLData* data, FFOpenCLResult* result) cl_device_id deviceIDs[32]; cl_uint numDevices = (cl_uint) (sizeof(deviceIDs) / sizeof(deviceIDs[0])); - data->ffclGetDeviceIDs(platforms[iplat], CL_DEVICE_TYPE_GPU, numDevices, deviceIDs, &numDevices); + if (data->ffclGetDeviceIDs(platforms[iplat], CL_DEVICE_TYPE_GPU, numDevices, deviceIDs, &numDevices) != CL_SUCCESS) + continue; for (cl_uint idev = 0; idev < numDevices; ++idev) {