Skip to content
Snippets Groups Projects
Unverified Commit 3f1f82a8 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #1457 from ogniK5377/unmap-buffer

Unmapping an unmapped buffer should succeed
parents ae982a9b c5c18424
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,12 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou
LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset);
const auto itr = buffer_mappings.find(params.offset);
ASSERT_MSG(itr != buffer_mappings.end(), "Tried to unmap invalid mapping");
if (itr == buffer_mappings.end()) {
LOG_WARNING(Service_NVDRV, "Tried to unmap an invalid offset 0x{:X}", params.offset);
// Hardware tests shows that unmapping an already unmapped buffer always returns successful
// and doesn't fail.
return 0;
}
auto& system_instance = Core::System::GetInstance();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment