Skip to content

Commit

Permalink
SWDEV-455869 - Revert "SWDEV-410751 - Consider null amd::memory is in…
Browse files Browse the repository at this point in the history
…valid."

This reverts commit a9ff2c5.

Change-Id: I26c4b3c74b2861afc17f979492d025b59d4388ab
  • Loading branch information
Anusha GodavarthySurya authored and yanyao-wang committed May 3, 2024
1 parent 2f7c239 commit 8a82c14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hipamd/src/hip_hmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ hipError_t hipMemPrefetchAsync(const void* dev_ptr, size_t count, int device,
size_t offset = 0;
amd::Memory* memObj = getMemoryObject(dev_ptr, offset);

if (memObj == nullptr || (memObj && count > (memObj->getSize() - offset))) {
if ((memObj != nullptr) && (count > (memObj->getSize() - offset))) {
HIP_RETURN(hipErrorInvalidValue);
}
if (device != hipCpuDeviceId && (static_cast<size_t>(device) >= g_devices.size())) {
Expand Down

0 comments on commit 8a82c14

Please sign in to comment.