From 5749fdc53517179d9922235c9a1b5e99c6ac3abc Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 23 May 2022 18:21:40 +0100 Subject: [PATCH] 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 dee90a4532b..534ff790245 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);