platform-mc: fix infinite retry on FRU record table response error

In getFRURecordTable() and getFRURecordTableMetadata(), when the PLDM
response decode succeeds but the completion code is non-zero, rc is 0
(PLDM_SUCCESS) at that point. Returning rc instead of completionCode
caused the caller getFRURecordTables() to treat the error as success
and loop indefinitely, flooding the log with repeated errors like:

  Error : GetFRURecordTable for terminus ID 1, complete code 128.

Fix by returning completionCode when it is non-PLDM_SUCCESS, so the
caller exits the transfer loop correctly.

Change-Id: I35bb9535ac3aeeb12e842ddce48988e1f1a04418
Signed-off-by: Vishnunithyasoundhar S <vishnunithyasoundhar.s@intel.com>
Co-developed-by: Arun P. Mohanan <arun.p.m@intel.com>
diff --git a/platform-mc/platform_manager.cpp b/platform-mc/platform_manager.cpp
index 5d85277..85e790c 100644
--- a/platform-mc/platform_manager.cpp
+++ b/platform-mc/platform_manager.cpp
@@ -677,7 +677,7 @@
         lg2::error(
             "Error : GetFRURecordTableMetadata for terminus ID {TID}, complete code {CC}.",
             "TID", tid, "CC", completionCode);
-        co_return rc;
+        co_return completionCode;
     }
 
     co_return rc;
@@ -742,7 +742,7 @@
         lg2::error(
             "Error : GetFRURecordTable for terminus ID {TID}, complete code {CC}.",
             "TID", tid, "CC", completionCode);
-        co_return rc;
+        co_return completionCode;
     }
 
     co_return rc;