SWDEV-369668 - update error check for hipGetError

Change-Id: I8f991237d59d04c9b6b3965a453ba3f54718eb43
This commit is contained in:
pghafari authored and Payam Ghafari committed 2022-12-08 15:56:49 -05:00
1 parent 6d3b8d0106
commit 52878fd039
1 file changed
+2 -2
+2 -2
Vedi File
@@ -357,7 +357,7 @@ hipError_t hipDrvGetErrorName(hipError_t hip_error, const char** errStr)
return hipErrorInvalidValue;
}
*errStr = ihipGetErrorName(hip_error);
if (!strcmp( *errStr, "hipErrorUnknown")) {
if (strcmp( *errStr, "hipErrorUnknown") != 0) {
return hipSuccess;
} else {
return hipErrorInvalidValue;
@@ -370,7 +370,7 @@ hipError_t hipDrvGetErrorString(hipError_t hip_error, const char** errStr)
return hipErrorInvalidValue;
}
*errStr = ihipGetErrorString(hip_error);
if (!strcmp( *errStr, "unkown error")) {
if (strcmp( *errStr, "unknown error") != 0) {
return hipSuccess;
} else {
return hipErrorInvalidValue;