|
3 | 3 | * Copyright (c) 2004-2011 The Trustees of Indiana University and Indiana
|
4 | 4 | * University Research and Technology
|
5 | 5 | * Corporation. All rights reserved.
|
6 |
| - * Copyright (c) 2004-2014 The University of Tennessee and The University |
| 6 | + * Copyright (c) 2004-2022 The University of Tennessee and The University |
7 | 7 | * of Tennessee Research Foundation. All rights
|
8 | 8 | * reserved.
|
9 | 9 | * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
@@ -876,11 +876,7 @@ int mca_btl_smcuda_sendi(struct mca_btl_base_module_t *btl,
|
876 | 876 | }
|
877 | 877 | /* We do not want to use this path when we have CUDA IPC support */
|
878 | 878 | if ((convertor->flags & CONVERTOR_CUDA) && (IPC_ACKED == endpoint->ipcstate)) {
|
879 |
| - if (NULL != descriptor) { |
880 |
| - *descriptor = mca_btl_smcuda_alloc(btl, endpoint, order, payload_size + header_size, |
881 |
| - flags); |
882 |
| - } |
883 |
| - return OPAL_ERR_RESOURCE_BUSY; |
| 879 | + goto return_resource_busy; |
884 | 880 | }
|
885 | 881 | #endif /* OPAL_CUDA_SUPPORT */
|
886 | 882 |
|
@@ -942,8 +938,10 @@ int mca_btl_smcuda_sendi(struct mca_btl_base_module_t *btl,
|
942 | 938 | return OPAL_SUCCESS;
|
943 | 939 | }
|
944 | 940 |
|
945 |
| - /* presumably, this code path will never get executed */ |
946 |
| - *descriptor = mca_btl_smcuda_alloc(btl, endpoint, order, payload_size + header_size, flags); |
| 941 | + return_resource_busy: |
| 942 | + if (NULL != descriptor) { |
| 943 | + *descriptor = mca_btl_smcuda_alloc(btl, endpoint, order, payload_size + header_size, flags); |
| 944 | + } |
947 | 945 | return OPAL_ERR_RESOURCE_BUSY;
|
948 | 946 | }
|
949 | 947 |
|
|
0 commit comments