git: 5749fdc53517 - main - Use the error given in the bcm PCI driver

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 23 May 2022 17:24:42 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=5749fdc53517179d9922235c9a1b5e99c6ac3abc

commit 5749fdc53517179d9922235c9a1b5e99c6ac3abc
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-05-23 17:21:40 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-05-23 17:21:40 +0000

    Use the error given in the bcm PCI driver
    
    When given an error return it and not just ENXIO as it may contain
    information usefule to debug an error.
    
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm/broadcom/bcm2835/bcm2838_pci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/arm/broadcom/bcm2835/bcm2838_pci.c b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
index dee90a4532bc..534ff790245e 100644
--- a/sys/arm/broadcom/bcm2835/bcm2838_pci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
@@ -536,7 +536,7 @@ bcm_pcib_msi_attach(device_t dev)
 	    INTR_MPSAFE, bcm_pcib_msi_intr, NULL, sc, &sc->msi_intr_cookie);
 	if (error != 0) {
 		device_printf(dev, "error: failed to setup MSI handler.\n");
-		return (ENXIO);
+		return (error);
 	}
 
 	bcm_name = device_get_nameunit(dev);
@@ -547,7 +547,7 @@ bcm_pcib_msi_attach(device_t dev)
 		if (error != 0) {
 			device_printf(dev,
 			"error: failed to register interrupt %d.\n", i);
-			return (ENXIO);
+			return (error);
 		}
 	}
 
@@ -557,7 +557,7 @@ bcm_pcib_msi_attach(device_t dev)
 
 	error = intr_msi_register(dev, xref);
 	if (error != 0)
-		return (ENXIO);
+		return (error);
 
 	mtx_init(&sc->msi_mtx, "bcm_pcib: msi_mtx", NULL, MTX_DEF);