SWDEV-369668 - updating return for invalid value

Change-Id: Ia380dd418845c84f5ab910b32dfd4907af06852d
This commit is contained in:
pghafari
2022-12-01 23:06:52 -05:00
parent 4d744547eb
commit 539ee310c3
+11 -3
View File
@@ -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;
}
if (!strcmp( *errStr, "unkown error")) {
return hipSuccess;
} else {
return hipErrorInvalidValue;
}
}