A follow up to the locking part, now for `unlock`
In `unlock` we used to update the `lockedX`
in `unlockHostImpl` which is not called if
`hostHandle` is not allocated.
Bug: 269194950
Test: presubmit
Change-Id: Ia84912d9fd5c670fa812564dc0fd653de208800c
Signed-off-by: Roman Kiryanov <rkir@google.com>
diff --git a/system/hals/mapper3.cpp b/system/hals/mapper3.cpp
index c136f84..46956d6 100644
--- a/system/hals/mapper3.cpp
+++ b/system/hals/mapper3.cpp
@@ -527,6 +527,12 @@
unlockHostImpl(*cb, bufferBits);
}
+ cb->lockedLeft = 0;
+ cb->lockedTop = 0;
+ cb->lockedWidth = 0;
+ cb->lockedHeight = 0;
+ cb->lockedUsage = 0;
+
RETURN(Error3::NONE);
}
@@ -574,12 +580,6 @@
}
}
}
-
- cb.lockedLeft = 0;
- cb.lockedTop = 0;
- cb.lockedWidth = 0;
- cb.lockedHeight = 0;
- cb.lockedUsage = 0;
}
/* BufferUsage bits that must be zero */