aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2026-08-07 20:46:22 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2026-08-07 22:14:53 +0000
commit2ae8976a3f6a7e4deb1905326145f5c2575264f4 (patch)
tree19a5b586164278e158f8ddb789ac1a878c7446a7
parent9d765453b0a93f2ec4ca2b91c3a20ec909bd3b6d (diff)
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
-rw-r--r--sys/dev/ocs_fc/ocs_hw.c6
1 files 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;
}
}