From 539ee310c3fb9e7333d0cd5852093064094cc0d8 Mon Sep 17 00:00:00 2001 From: pghafari Date: Thu, 1 Dec 2022 23:06:52 -0500 Subject: [PATCH] SWDEV-369668 - updating return for invalid value Change-Id: Ia380dd418845c84f5ab910b32dfd4907af06852d --- hipamd/src/hip_error.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hipamd/src/hip_error.cpp b/hipamd/src/hip_error.cpp index faa56de5d0..fcffeb6536 100644 --- a/hipamd/src/hip_error.cpp +++ b/hipamd/src/hip_error.cpp @@ -357,7 +357,11 @@ hipError_t hipDrvGetErrorName(hipError_t hip_error, const char** errStr) return hipErrorInvalidValue; } *errStr = ihipGetErrorName(hip_error); - return hipSuccess; + if (!strcmp( *errStr, "hipErrorUnknown")) { + return hipSuccess; + } else { + return hipErrorInvalidValue; + } } hipError_t hipDrvGetErrorString(hipError_t hip_error, const char** errStr) @@ -366,5 +370,9 @@ hipError_t hipDrvGetErrorString(hipError_t hip_error, const char** errStr) return hipErrorInvalidValue; } *errStr = ihipGetErrorString(hip_error); - return hipSuccess; -} \ No newline at end of file + if (!strcmp( *errStr, "unkown error")) { + return hipSuccess; + } else { + return hipErrorInvalidValue; + } +}