The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2ae8976a3f6a7e4deb1905326145f5c2575264f4

commit 2ae8976a3f6a7e4deb1905326145f5c2575264f4
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2026-08-07 20:46:22 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2026-08-07 22:14:53 +0000

    ocs_fc: return correct error code from ocs_hw_set_persistent_topology()
    
    No functional change, as current callers either don't check the return
    value or check it against OCS_HW_RTN_SUCCESS only.
    
    Found with:     clang -Werror=assign-enum
---
 sys/dev/ocs_fc/ocs_hw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c
index 62ef3cd49be3..f4935db8f321 100644
--- a/sys/dev/ocs_fc/ocs_hw.c
+++ b/sys/dev/ocs_fc/ocs_hw.c
@@ -12209,7 +12209,7 @@ ocs_hw_set_persistent_topology(ocs_hw_t *hw, uint32_t 
topology, uint32_t opts)
 
        default:
                ocs_log_err(hw->os, "unsupported topology %#x\n", topology);
-               return -1;
+               return OCS_HW_RTN_ERROR;
        }
 
        ocs_sem_init(&request.semaphore, 0, "set_persistent_topo");
@@ -12235,12 +12235,12 @@ ocs_hw_set_persistent_topology(ocs_hw_t *hw, uint32_t 
topology, uint32_t opts)
 
                if (ocs_sem_p(&request.semaphore, OCS_SEM_FOREVER)) {
                        ocs_log_err(hw->os, "ocs_sem_p failed\n");
-                       return -ENXIO;
+                       return OCS_HW_RTN_ERROR;
                }
 
                if (request.status) {
                        ocs_log_err(hw->os, "set persistent topology failed; 
status: %d\n", request.status);
-                       return -EFAULT;
+                       return OCS_HW_RTN_ERROR;
                }
        }
 

Reply via email to