Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/qbus add missing splx() found by brainy



details:   https://anonhg.NetBSD.org/src/rev/d8260e253b12
branches:  trunk
changeset: 810699:d8260e253b12
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 12 19:21:50 2015 +0000

description:
add missing splx() found by brainy

diffstat:

 sys/dev/qbus/if_il.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (79 lines):

diff -r 6d54e2a6c704 -r d8260e253b12 sys/dev/qbus/if_il.c
--- a/sys/dev/qbus/if_il.c      Sat Sep 12 19:19:11 2015 +0000
+++ b/sys/dev/qbus/if_il.c      Sat Sep 12 19:21:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_il.c,v 1.27 2014/05/29 07:08:10 wiz Exp $   */
+/*     $NetBSD: if_il.c,v 1.28 2015/09/12 19:21:50 christos Exp $      */
 /*
  * Copyright (c) 1982, 1986 Regents of the University of California.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_il.c,v 1.27 2014/05/29 07:08:10 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_il.c,v 1.28 2015/09/12 19:21:50 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -291,8 +291,7 @@
        IL_WCSR(IL_CSR, ILC_RESET);
        if (ilwait(sc, "hardware diag")) {
                sc->sc_if.if_flags &= ~IFF_UP;
-               splx(s);
-               return 0;
+               goto out;
        }
        IL_WCSR(IL_CSR, ILC_CISA);
        while ((IL_RCSR(IL_CSR) & IL_CDONE) == 0)
@@ -310,28 +309,28 @@
                IL_WCSR(IL_BCR, ETHER_ADDR_LEN);
                IL_WCSR(IL_CSR, ((sc->sc_ui.ui_baddr >> 2) & IL_EUA)|ILC_LDPA);
                if (ilwait(sc, "setaddr"))
-                       return 0;
+                       goto out;
                IL_WCSR(IL_BAR, LOWORD(sc->sc_ui.ui_baddr));
                IL_WCSR(IL_BCR, sizeof (struct il_stats));
                IL_WCSR(IL_CSR, ((sc->sc_ui.ui_baddr >> 2) & IL_EUA)|ILC_STAT);
                if (ilwait(sc, "verifying setaddr"))
-                       return 0;
+                       goto out;
                if (memcmp(sc->sc_stats.ils_addr,
                    CLLADDR(ifp->if_sadl), ETHER_ADDR_LEN) != 0) {
                        aprint_error_dev(sc->sc_dev, "setaddr didn't work\n");
-                       return 0;
+                       goto out;
                }
        }
 #ifdef MULTICAST
        if (is->is_if.if_flags & IFF_PROMISC) {
                addr->il_csr = ILC_PRMSC;
                if (ilwait(ui, "all multi"))
-                       return 0;
+                       goto out;
        } else if (is->is_if.if_flags & IFF_ALLMULTI) {
        too_many_multis:
                addr->il_csr = ILC_ALLMC;
                if (ilwait(ui, "all multi"))
-                       return 0;
+                       goto out;
        } else {
                int i;
                register struct ether_addr *ep = is->is_maddrs;
@@ -360,7 +359,7 @@
                        addr->il_csr = ((is->is_ubaddr >> 2) & IL_EUA)|
                                                LC_LDGRPS;
                        if (ilwait(ui, "load multi"))
-                               return;
+                               goto out;
                } else {
                    is->is_if.if_flags |= IFF_ALLMULTI;
                    goto too_many_multis;
@@ -388,6 +387,7 @@
        sc->sc_flags |= ILF_RUNNING;
        sc->sc_lastcmd = 0;
        ilcint(sc);
+out:
        splx(s);
        return 0;
 }



Home | Main Index | Thread Index | Old Index