From 84fbb30b7c88c65bef4540af10fcf5831314d4b8 Mon Sep 17 00:00:00 2001 From: Sourabh Betigeri Date: Mon, 26 Sep 2022 22:39:31 -0700 Subject: [PATCH] SWDEV-357246 - Adds a missing return statement Change-Id: I2216f71f4d4fb6dd3766023b0c821cb3d35d7849 --- rocclr/platform/memory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rocclr/platform/memory.cpp b/rocclr/platform/memory.cpp index 1edd79b3af..0b8d7e3ee7 100644 --- a/rocclr/platform/memory.cpp +++ b/rocclr/platform/memory.cpp @@ -329,7 +329,7 @@ bool Memory::addDeviceMemory(const Device* dev) { if (numDevices() == NumDevicesWithP2P()) { // Mark the allocation as an empty deviceAlloced_[dev].store(AllocInit, std::memory_order_release); - return false; + return result; } device::Memory* dm = dev->createMemory(*this); @@ -349,6 +349,7 @@ bool Memory::addDeviceMemory(const Device* dev) { LogError("Video memory allocation failed!"); // Mark the allocation as an empty deviceAlloced_[dev].store(AllocInit, std::memory_order_release); + return result; } }