From ed4014e51953a4060b6bad74fed9b277bc1c1b50 Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Wed, 23 Mar 2022 13:35:37 +0000 Subject: [PATCH] SWDEV-329082 - Return right error code for hipHostUnregister hipErrorHostMemoryNotRegistered should be returned when an unregistered pointer is passed to hipHostUnregister Change-Id: Ie76086b602bde2cd7a7a2b049cd03d29454ff306 --- hipamd/src/hip_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/src/hip_memory.cpp b/hipamd/src/hip_memory.cpp index a4cc73f31d..12da05183e 100644 --- a/hipamd/src/hip_memory.cpp +++ b/hipamd/src/hip_memory.cpp @@ -1044,7 +1044,7 @@ hipError_t hipHostUnregister(void* hostPtr) { } LogPrintfError("Cannot unregister host_ptr: 0x%x \n", hostPtr); - HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorHostMemoryNotRegistered); } // Deprecated function: