summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2019-07-24 07:33:37 -0400
committerGravatar Lioncash2019-08-29 19:29:43 -0400
commit96cc9a92794309d83f03a34d34a6f2f24a68ac3e (patch)
tree28510cc4d919a670dbcb1dd10a69651124cb7240 /src
parentkernel/vm_manager: Reserve memory ahead of time for slow path in MergeAdjacen... (diff)
downloadyuzu-96cc9a92794309d83f03a34d34a6f2f24a68ac3e.tar.gz
yuzu-96cc9a92794309d83f03a34d34a6f2f24a68ac3e.tar.xz
yuzu-96cc9a92794309d83f03a34d34a6f2f24a68ac3e.zip
kernel/vm_manager: Correct behavior in failure case of UnmapPhysicalMemory()
If an unmapping operation fails, we shouldn't be decrementing the amount of memory mapped and returning that the operation was successful. We should actually be returning the error code in this case.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/vm_manager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index 6b2d78cc8..6ec4159ca 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -447,6 +447,8 @@ ResultCode VMManager::UnmapPhysicalMemory(VAddr target, u64 size) {
447 map_size, MemoryState::Heap, VMAPermission::None); 447 map_size, MemoryState::Heap, VMAPermission::None);
448 ASSERT_MSG(remap_res.Succeeded(), "Failed to remap a memory block."); 448 ASSERT_MSG(remap_res.Succeeded(), "Failed to remap a memory block.");
449 } 449 }
450
451 return result;
450 } 452 }
451 453
452 // Update mapped amount 454 // Update mapped amount