Follow up CL to "Adjust code in response to Burst validation tests"

Bug: 129779280
Bug: 129157135
Test: mma
Change-Id: I36746ba31a6a68ead2a00f6135a5a6db83c32d14
diff --git a/nn/common/ExecutionBurstServer.cpp b/nn/common/ExecutionBurstServer.cpp
index 9bdcfdb..6f568dd 100644
--- a/nn/common/ExecutionBurstServer.cpp
+++ b/nn/common/ExecutionBurstServer.cpp
@@ -43,10 +43,7 @@
 
     bool isCacheEntryPresent(int32_t slot) const override {
         const auto it = mMemoryCache.find(slot);
-        if (it == mMemoryCache.end()) {
-            return false;
-        }
-        return it->second.valid();
+        return (it != mMemoryCache.end()) && it->second.valid();
     }
 
     void addCacheEntry(const hidl_memory& memory, int32_t slot) override {
@@ -418,7 +415,11 @@
                 << "ResultChannelSender::sendPacket -- packet size exceeds size available in FMQ";
         const std::vector<FmqResultDatum> errorPacket =
                 serialize(ErrorStatus::GENERAL_FAILURE, {}, kNoTiming);
-        return mFmqResultChannel->writeBlocking(errorPacket.data(), errorPacket.size());
+        if (mBlocking) {
+            return mFmqResultChannel->writeBlocking(errorPacket.data(), errorPacket.size());
+        } else {
+            return mFmqResultChannel->write(errorPacket.data(), errorPacket.size());
+        }
     }
 
     if (mBlocking) {