SWDEV-266089: hipStreamAddCallback argument validation

Change-Id: I3e61006796e88b4e2ba029118c95f3499959257b
Este commit está contenido en:
agodavar
2020-12-29 05:42:54 -05:00
padre df686db4d8
commit 2a4568d416
+4 -1
Ver fichero
@@ -346,7 +346,10 @@ hipError_t hipStreamQuery(hipStream_t stream) {
hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void* userData,
unsigned int flags) {
HIP_INIT_API(hipStreamAddCallback, stream, callback, userData, flags);
//flags - Reserved for future use, must be 0
if (callback == nullptr || flags != 0) {
HIP_RETURN(hipErrorInvalidValue);
}
amd::HostQueue* hostQueue = hip::getQueue(stream);
amd::Command* command = hostQueue->getLastQueuedCommand(true);
if (command == nullptr) {