git: ee07d7121314 - main - qlnx: Return error from qlnxr_mod_load if it fails.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 08 Apr 2022 00:03:32 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ee07d712131468908a61b948851ce17be76931ac commit ee07d712131468908a61b948851ce17be76931ac Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-08 00:01:27 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-08 00:01:27 +0000 qlnx: Return error from qlnxr_mod_load if it fails. Fix qlnx_rdma_register_if return ENXIO rather than -1 on error and propagate that error to the caller in qlnxr_mod_load. --- sys/dev/qlnx/qlnxe/qlnx_rdma.c | 2 +- sys/dev/qlnx/qlnxr/qlnxr_os.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_rdma.c b/sys/dev/qlnx/qlnxe/qlnx_rdma.c index 26b1679ca137..68d9196fb7c9 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_rdma.c +++ b/sys/dev/qlnx/qlnxe/qlnx_rdma.c @@ -246,7 +246,7 @@ qlnx_rdma_register_if(qlnx_rdma_if_t *rdma_if) return (0); } - return (-1); + return (ENXIO); } int diff --git a/sys/dev/qlnx/qlnxr/qlnxr_os.c b/sys/dev/qlnx/qlnxr/qlnxr_os.c index 6190a69e413f..b4771e97b705 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_os.c +++ b/sys/dev/qlnx/qlnxr/qlnxr_os.c @@ -1300,7 +1300,7 @@ qlnxr_mod_load(void) ret = qlnx_rdma_register_if(&qlnxr_drv); - return (0); + return (ret); } static int