Skip to content

Commit 1e9e9b7

Browse files
author
Luke Robison
committed
mtl/ofi: Check ompi_ret in ompi_mtl_ofi_send_generic
Correct issue Coverity issue CID 1515755. Signed-off-by: Luke Robison <[email protected]>
1 parent 2a52280 commit 1e9e9b7

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
@@ -855,11 +855,17 @@ ompi_mtl_ofi_send_generic(struct mca_mtl_base_module_t *mtl,
855855
if (mtl_comm->c_index_vec[dest].c_index_state == MCA_MTL_OFI_CID_NOT_EXCHANGED) {
856856
mtl_comm->c_index_vec[dest].c_index_state = MCA_MTL_OFI_CID_EXCHANGING;
857857
ompi_ret = ompi_mtl_ofi_send_excid(mtl, comm, dest, ofi_cq_data, true);
858+
if (OPAL_UNLIKELY(OMPI_SUCCESS != ompi_ret)) {
859+
return ompi_ret;
860+
}
858861
}
859862

860863
if (mtl_comm->c_index_vec[dest].c_index_state > MCA_MTL_OFI_CID_EXCHANGED) {
861864
while (mtl_comm->c_index_vec[dest].c_index_state > MCA_MTL_OFI_CID_EXCHANGED) {
862865
ompi_ret = ompi_mtl_ofi_post_recv_excid_buffer(true, comm, dest);
866+
if (OPAL_UNLIKELY(OMPI_SUCCESS != ompi_ret)) {
867+
return ompi_ret;
868+
}
863869
}
864870
}
865871
c_index_for_tag = mtl_comm->c_index_vec[dest].c_index;

0 commit comments

Comments
 (0)