gralloc1: Add proper check for linear format
CRs-Fixed: 2079563
Change-Id: I05a400bda32562810fe8d35ee816f151a2665ec2
diff --git a/libgralloc1/gr_buf_mgr.cpp b/libgralloc1/gr_buf_mgr.cpp
index 584737d..6f59402 100644
--- a/libgralloc1/gr_buf_mgr.cpp
+++ b/libgralloc1/gr_buf_mgr.cpp
@@ -705,7 +705,7 @@
*flag = hnd->flags &private_handle_t::PRIV_FLAGS_UBWC_ALIGNED;
int linear_format = 0;
if (getMetaData(hnd, GET_LINEAR_FORMAT, &linear_format) == 0) {
- if (!linear_format) {
+ if (linear_format) {
*flag = 0;
}
}