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

Commit c439e1e1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix return error."

parents f7c32f3f 9ce7bfa3
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]};