diff --git a/hipamd/src/hip_event.cpp b/hipamd/src/hip_event.cpp index 855dca47af..1ac62186b8 100755 --- a/hipamd/src/hip_event.cpp +++ b/hipamd/src/hip_event.cpp @@ -259,14 +259,14 @@ hipError_t hipEventDestroy(hipEvent_t event) { hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t stop) { HIP_INIT_API(hipEventElapsedTime, ms, start, stop); - if (start == nullptr || stop == nullptr) { - HIP_RETURN(hipErrorInvalidHandle); - } - if (ms == nullptr) { HIP_RETURN(hipErrorInvalidValue); } + if (start == nullptr || stop == nullptr) { + HIP_RETURN(hipErrorInvalidHandle); + } + hip::Event* eStart = reinterpret_cast(start); hip::Event* eStop = reinterpret_cast(stop);