or perhaps we just remove aac entirely?

/sys/dev/ic/aac.c:1282:6: error: variable 'error' is used uninitialized 
whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (sc->total_fibs == 0)
            ^~~~~~~~~~~~~~~~~~~

Index: aac.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/aac.c,v
retrieving revision 1.91
diff -u -p -r1.91 aac.c
--- aac.c       15 Oct 2020 00:01:24 -0000      1.91
+++ aac.c       3 Jan 2022 08:37:24 -0000
@@ -1279,8 +1279,10 @@ aac_init(struct aac_softc *sc)
                if (aac_alloc_commands(sc) != 0)
                        break;
        }
-       if (sc->total_fibs == 0)
-               goto out;
+       if (sc->total_fibs == 0) {
+               error = ENOMEM;
+               goto bail_out;
+       }
 
        scsi_iopool_init(&sc->aac_iopool, sc,
            aac_alloc_command, aac_release_command);
@@ -1430,7 +1432,6 @@ aac_init(struct aac_softc *sc)
        if (state > 0)
                bus_dmamem_free(sc->aac_dmat, &seg, 1);
 
- out:
        return (error);
 }
 

Reply via email to