Input args NULL check in hipChooseDevice
Change-Id: I1a7b8cded2f81d739645bbf3dab2f04bb9c3c796
[ROCm/hip commit: a833b9a704]
Este cometimento está contido em:
@@ -415,6 +415,10 @@ hipError_t hipChooseDevice( int* device, const hipDeviceProp_t* prop )
|
|||||||
int inPropCount = 0;
|
int inPropCount = 0;
|
||||||
int matchedPropCount = 0;
|
int matchedPropCount = 0;
|
||||||
hipError_t e = hipSuccess;
|
hipError_t e = hipSuccess;
|
||||||
|
if((device == NULL) || (prop == NULL)) {
|
||||||
|
e = hipErrorInvalidValue;
|
||||||
|
}
|
||||||
|
if(e == hipSuccess) {
|
||||||
ihipGetDeviceCount( &deviceCount );
|
ihipGetDeviceCount( &deviceCount );
|
||||||
*device = 0;
|
*device = 0;
|
||||||
for (int i = 0; i < deviceCount; i++) {
|
for (int i = 0; i < deviceCount; i++) {
|
||||||
@@ -482,5 +486,7 @@ hipError_t hipChooseDevice( int* device, const hipDeviceProp_t* prop )
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ihipLogStatus(e);
|
return ihipLogStatus(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Criar uma nova questão referindo esta
Bloquear um utilizador