Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Don't return an uninitialized error code.



details:   https://anonhg.NetBSD.org/src/rev/d2ca9cbcbb05
branches:  trunk
changeset: 485712:d2ca9cbcbb05
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed May 03 18:58:37 2000 +0000

description:
Don't return an uninitialized error code.

diffstat:

 sys/dev/ic/adw.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 67435aa5a040 -r d2ca9cbcbb05 sys/dev/ic/adw.c
--- a/sys/dev/ic/adw.c  Wed May 03 18:58:15 2000 +0000
+++ b/sys/dev/ic/adw.c  Wed May 03 18:58:37 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adw.c,v 1.16 2000/04/30 18:52:15 dante Exp $        */
+/* $NetBSD: adw.c,v 1.17 2000/05/03 18:58:37 thorpej Exp $      */
 
 /*
  * Generic driver for the Advanced Systems Inc. SCSI controllers
@@ -174,6 +174,7 @@
        sc->sc_control->carriers = malloc(ADW_CARRIER_SIZE * ADW_MAX_CARRIER,
                        M_DEVBUF, M_WAITOK);
        if(!sc->sc_control->carriers) {
+               error = ENOMEM;
                printf("%s: malloc() failed in allocating carrier structures,"
                       " error = %d\n", sc->sc_dev.dv_xname, error);
                return (error);
@@ -482,6 +483,8 @@
        if(!retry)
                TAILQ_INSERT_TAIL(&sc->sc_waiting_ccb, ccb, chain);
 
+       errcode = ADW_SUCCESS;
+
        while ((ccb = sc->sc_waiting_ccb.tqh_first) != NULL) {
 
                errcode = AdvExeScsiQueue(sc, &ccb->scsiq);



Home | Main Index | Thread Index | Old Index