We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8baf31 commit d53a23fCopy full SHA for d53a23f
1 file changed
src/provider/provider_level_zero.c
@@ -361,12 +361,17 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetResidentDevices(
361
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
362
}
363
364
- if (residentDevicesCount && !residentDevicesIndices) {
+ if (residentDevicesCount > 0 && residentDevicesIndices == NULL) {
365
LOG_ERR("Resident devices indices array is NULL, but "
366
"residentDevicesCount is not zero");
367
368
369
370
+ if (deviceCount > 0 && hDevices == NULL) {
371
+ LOG_ERR("All devices array is NULL, but deviceCount is not zero");
372
+ return UMF_RESULT_ERROR_INVALID_ARGUMENT;
373
+ }
374
+
375
hParams->device_handles = hDevices;
376
hParams->device_count = deviceCount;
377
hParams->resident_device_indices = residentDevicesIndices;
0 commit comments