SWDEV-330661 - devicePointer null checking.

Change-Id: I3366031954330143109d0a79e86fd0e0ec996f01
Этот коммит содержится в:
Jaydeep Patel authored and Jaydeepkumar Patel committed 2022-04-08 00:08:37 -04:00
1 родитель c0ada4320b
Коммит ff78c439ef
1 file changed
+5
+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);