git: 872428aceaa5 - stable/13 - qlnx: Return error from qlnxr_mod_load if it fails.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 13 May 2022 17:58:44 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=872428aceaa586e54eb7415a9caa81dd9ac7ed72

commit 872428aceaa586e54eb7415a9caa81dd9ac7ed72
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-08 00:01:27 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-13 17:43:38 +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.
    
    (cherry picked from commit ee07d712131468908a61b948851ce17be76931ac)
---
 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 5929fee5d263..276219134843 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_rdma.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_rdma.c
@@ -249,7 +249,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 62c0f2091d2f..22d968ce2367 100644
--- a/sys/dev/qlnx/qlnxr/qlnxr_os.c
+++ b/sys/dev/qlnx/qlnxr/qlnxr_os.c
@@ -1293,7 +1293,7 @@ qlnxr_mod_load(void)
 
 	ret = qlnx_rdma_register_if(&qlnxr_drv);
 
-	return (0);
+	return (ret);
 }
 
 static int