Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys/dev/usb Remove useless checks



details:   https://anonhg.NetBSD.org/src/rev/0092eee9b1e4
branches:  nick-nhusb
changeset: 334643:0092eee9b1e4
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Feb 06 10:20:01 2017 +0000

description:
Remove useless checks

diffstat:

 sys/dev/usb/if_smsc.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 0d4ca26335d2 -r 0092eee9b1e4 sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c     Mon Feb 06 09:08:48 2017 +0000
+++ b/sys/dev/usb/if_smsc.c     Mon Feb 06 10:20:01 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_smsc.c,v 1.22.2.34 2017/02/06 09:08:48 skrll Exp $  */
+/*     $NetBSD: if_smsc.c,v 1.22.2.35 2017/02/06 10:20:01 skrll Exp $  */
 
 /*     $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -318,8 +318,7 @@
        uint32_t flow;
        uint32_t afc_cfg;
 
-       if (mii == NULL || ifp == NULL ||
-           (ifp->if_flags & IFF_RUNNING) == 0)
+       if ((ifp->if_flags & IFF_RUNNING) == 0)
                return;
 
        /* Use the MII status to determine link status */
@@ -1236,9 +1235,6 @@
 
        struct ifnet * const ifp = &sc->sc_ec.ec_if;
        struct mii_data * const mii = &sc->sc_mii;
-       if (mii == NULL)
-               return;
-
        const int s = splnet();
 
        mii_tick(mii);



Home | Main Index | Thread Index | Old Index