Revert "pldm: use std::expected for instance ID allocation"
This reverts commit 70262ed7bf854b25d4b65628bc3c892ddfe9380f.
Change-Id: I1f54d6b60bf3cfa9f00764140eec6167e1e182d6
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/platform-mc/dbus_to_terminus_effecters.cpp b/platform-mc/dbus_to_terminus_effecters.cpp
index 594e3c4..0c27f95 100644
--- a/platform-mc/dbus_to_terminus_effecters.cpp
+++ b/platform-mc/dbus_to_terminus_effecters.cpp
@@ -481,13 +481,7 @@
}
}
- auto instanceIdResult =
- pldm::utils::getInstanceId(instanceIdDb->next(mctpEid));
- if (!instanceIdResult)
- {
- return PLDM_ERROR;
- }
- auto instanceId = instanceIdResult.value();
+ auto instanceId = instanceIdDb->next(mctpEid);
int rc = PLDM_ERROR;
std::vector<uint8_t> requestMsg;
@@ -626,13 +620,7 @@
}
uint8_t& compEffCnt = hostEffecterInfo[effecterInfoIndex].compEffecterCnt;
- auto instanceIdResult =
- pldm::utils::getInstanceId(instanceIdDb->next(mctpEid));
- if (!instanceIdResult)
- {
- return PLDM_ERROR;
- }
- auto instanceId = instanceIdResult.value();
+ auto instanceId = instanceIdDb->next(mctpEid);
std::vector<uint8_t> requestMsg(
sizeof(pldm_msg_hdr) + sizeof(effecterId) + sizeof(compEffCnt) +