SWDEV-330661 - devicePointer null checking.

Change-Id: I3366031954330143109d0a79e86fd0e0ec996f01


[ROCm/clr commit: ff78c439ef]
This commit is contained in:
Jaydeep Patel authored and Jaydeepkumar Patel committed 2022-04-08 00:08:37 -04:00
1 parent 83e2a8a892
commit 583aa7f008
1 file changed
+5
@@ -2608,9 +2608,14 @@ hipError_t hipIpcCloseMemHandle(void* dev_ptr) {
HIP_RETURN(hipSuccess);
}
hipError_t hipHostGetDevicePointer(void** devicePointer, void* hostPointer, unsigned flags) {
HIP_INIT_API(hipHostGetDevicePointer, devicePointer, hostPointer, flags);
if (devicePointer == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
size_t offset = 0;
amd::Memory* memObj = getMemoryObject(hostPointer, offset);