From ac5c6ad299751b1cfeae24f4ae9cdc604c769e02 Mon Sep 17 00:00:00 2001 From: Jaydeep Patel Date: Thu, 2 Mar 2023 04:41:04 +0000 Subject: [PATCH] SWDEV-362372 - Correct error code. Change-Id: Ife4f6e3481d0e804e676fe076f0928870c6bae57 [ROCm/clr commit: 4ac87c051d2d353b28154ddd8adafec4d956f543] --- projects/clr/hipamd/src/hip_stream.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index a396e81249..c41896714a 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -506,14 +506,10 @@ hipError_t hipStreamWaitEvent_common(hipStream_t stream, hipEvent_t event, unsig return hipErrorInvalidHandle; } - if (flags != 0) { + if (flags != 0 || !hip::isValid(stream)) { return hipErrorInvalidValue; } - if (!hip::isValid(stream)) { - return hipErrorContextIsDestroyed; - } - hip::Event* e = reinterpret_cast(event); return e->streamWait(stream, flags); }