summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Macnak <natsu@google.com>2022-02-11 10:56:58 -0800
committerCommit Bot <commit-bot@chromium.org>2022-02-24 03:36:31 +0000
commitcf5c7eb33fbb61432a14d6042ee564f4ec7a9310 (patch)
tree52fcab1fd37dca021585f83d4535782f91cbe4d8
parent40d5c7d98c91a22081d98e266792a343ce0bc405 (diff)
downloadminigbm-cf5c7eb33fbb61432a14d6042ee564f4ec7a9310.tar.gz
gralloc: Update reserved region fd check
to address comment on https://crrev.com/c/3441404 which was missed after commit queue was already +2'd. BUG=b:207388558 TEST=untested Change-Id: I7429bfd0e12b1442fd903b8c1e2a2abe97d8bd97 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3456848 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Tested-by: Jason Macnak <natsu@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
-rw-r--r--cros_gralloc/cros_gralloc_buffer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cros_gralloc/cros_gralloc_buffer.cc b/cros_gralloc/cros_gralloc_buffer.cc
index ae0e9b7..e1af7a4 100644
--- a/cros_gralloc/cros_gralloc_buffer.cc
+++ b/cros_gralloc/cros_gralloc_buffer.cc
@@ -227,7 +227,7 @@ int32_t cros_gralloc_buffer::flush()
int32_t cros_gralloc_buffer::get_reserved_region(void **addr, uint64_t *size) const
{
int32_t reserved_region_fd = hnd_->fds[hnd_->num_planes];
- if (reserved_region_fd == -1) {
+ if (reserved_region_fd < 0) {
drv_log("Buffer does not have reserved region.\n");
return -EINVAL;
}