Skip to content

Commit eb0ca97

Browse files
author
Luke Robison
committed
mtl/ofi: Check ompi_ret in ompi_mtl_ofi_send_generic
Correct Coverity issue CID 1515755. Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent bd33b99 commit eb0ca97

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ompi/mca/mtl/ofi/mtl_ofi.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,11 +865,17 @@ ompi_mtl_ofi_send_generic(struct mca_mtl_base_module_t *mtl,
865865
if (mtl_comm->c_index_vec[dest].c_index_state == MCA_MTL_OFI_CID_NOT_EXCHANGED) {
866866
mtl_comm->c_index_vec[dest].c_index_state = MCA_MTL_OFI_CID_EXCHANGING;
867867
ompi_ret = ompi_mtl_ofi_send_excid(mtl, comm, dest, ofi_cq_data, true);
868+
if (OPAL_UNLIKELY(OMPI_SUCCESS != ompi_ret)) {
869+
return ompi_ret;
870+
}
868871
}
869872

870873
if (mtl_comm->c_index_vec[dest].c_index_state > MCA_MTL_OFI_CID_EXCHANGED) {
871874
while (mtl_comm->c_index_vec[dest].c_index_state > MCA_MTL_OFI_CID_EXCHANGED) {
872875
ompi_ret = ompi_mtl_ofi_post_recv_excid_buffer(true, comm, dest);
876+
if (OPAL_UNLIKELY(OMPI_SUCCESS != ompi_ret)) {
877+
return ompi_ret;
878+
}
873879
}
874880
}
875881
c_index_for_tag = mtl_comm->c_index_vec[dest].c_index;

0 commit comments

Comments
 (0)