Added missing NULL checks and corrected API return values as per validation

[ROCm/clr commit: 4989452413]
이 커밋은 다음에 포함됨:
Anusha Godavarthy Surya
2019-06-27 00:19:05 +05:30
부모 493e713fde
커밋 e643bae27d
4개의 변경된 파일과 58개의 추가작업 그리고 50개의 파일을 삭제
+4 -2
파일 보기
@@ -41,8 +41,10 @@ THE SOFTWARE.
hipError_t ihipDeviceCanAccessPeer(int* canAccessPeer, hipCtx_t thisCtx, hipCtx_t peerCtx) {
hipError_t err = hipSuccess;
if ((thisCtx != NULL) && (peerCtx != NULL)) {
if(canAccessPeer == NULL) {
err = hipErrorInvalidValue;
}
else if ((thisCtx != NULL) && (peerCtx != NULL)) {
if (thisCtx == peerCtx) {
*canAccessPeer = 0;
tprintf(DB_MEM, "Can't be peer to self. (this=%s, peer=%s)\n",