Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ce7bfa3 authored by Tianyu's avatar Tianyu
Browse files

Fix return error.

Bug: None
Test: None
Change-Id: Ia1f292d30c3027d8432b4f8560a913f79c753437
parent 2a8f3d2a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -484,7 +484,7 @@ Status<std::vector<size_t>> ProducerQueue::AllocateBuffers(
  if (buffer_slots.size() == 0) {
    // Error out if no buffer is allocated and improted.
    ALOGE_IF(TRACE, "ProducerQueue::AllocateBuffers: no buffer allocated.");
    ErrorStatus(ENOMEM);
    return ErrorStatus(ENOMEM);
  }

  return {std::move(buffer_slots)};
@@ -505,7 +505,7 @@ Status<size_t> ProducerQueue::AllocateBuffer(uint32_t width, uint32_t height,

  if (status.get().size() == 0) {
    ALOGE_IF(TRACE, "ProducerQueue::AllocateBuffer: no buffer allocated.");
    ErrorStatus(ENOMEM);
    return ErrorStatus(ENOMEM);
  }

  return {status.get()[0]};