Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2022 14:23:35 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: f78547c69845 - stable/13 - Error is not a bool in bcm2838_pci, check for != 0
Message-ID:  <202206071423.257ENZaP020433@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by andrew:

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

commit f78547c69845a710aef392eed571b8f6aa8e3608
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-05-23 16:38:18 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-06-07 14:20:18 +0000

    Error is not a bool in bcm2838_pci, check for != 0
    
    Fix for style an check if error != 0 in the bcm2838 pci driver.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit c3147104fdddb5cb358726888a0a612439d10f9e)
---
 sys/arm/broadcom/bcm2835/bcm2838_pci.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/arm/broadcom/bcm2835/bcm2838_pci.c b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
index 377cb83ecbe1..0347a61b3c62 100644
--- a/sys/arm/broadcom/bcm2835/bcm2838_pci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
@@ -534,7 +534,7 @@ bcm_pcib_msi_attach(device_t dev)
 
 	error = bus_setup_intr(dev, sc->msi_irq_res, INTR_TYPE_BIO |
 	    INTR_MPSAFE, bcm_pcib_msi_intr, NULL, sc, &sc->msi_intr_cookie);
-	if (error) {
+	if (error != 0) {
 		device_printf(dev, "error: failed to setup MSI handler.\n");
 		return (ENXIO);
 	}
@@ -544,7 +544,7 @@ bcm_pcib_msi_attach(device_t dev)
 		sc->msi_isrcs[i].irq = i;
 		error = intr_isrc_register(&sc->msi_isrcs[i].isrc, dev, 0,
 		    "%s,%u", bcm_name, i);
-		if (error) {
+		if (error != 0) {
 			device_printf(dev,
 			"error: failed to register interrupt %d.\n", i);
 			return (ENXIO);
@@ -556,7 +556,7 @@ bcm_pcib_msi_attach(device_t dev)
 	OF_device_register_xref(xref, dev);
 
 	error = intr_msi_register(dev, xref);
-	if (error)
+	if (error != 0)
 		return (ENXIO);
 
 	mtx_init(&sc->msi_mtx, "bcm_pcib: msi_mtx", NULL, MTX_DEF);
@@ -651,15 +651,15 @@ bcm_pcib_attach(device_t dev)
 	    0, 					/* flags */
 	    NULL, NULL,				/* lockfunc, lockarg */
 	    &sc->dmat);
-	if (error)
+	if (error != 0)
 		return (error);
 
 	error = pci_host_generic_setup_fdt(dev);
-	if (error)
+	if (error != 0)
 		return (error);
 
 	error = bcm_pcib_check_ranges(dev);
-	if (error)
+	if (error != 0)
 		return (error);
 
 	mtx_init(&sc->config_mtx, "bcm_pcib: config_mtx", NULL, MTX_DEF);
@@ -743,7 +743,7 @@ bcm_pcib_attach(device_t dev)
 
 	/* Configure interrupts. */
 	error = bcm_pcib_msi_attach(dev);
-	if (error)
+	if (error != 0)
 		return (error);
 
 	/* Done. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206071423.257ENZaP020433>