Module Name: src
Committed By: skrll
Date: Mon Feb 6 10:20:01 UTC 2017
Modified Files:
src/sys/dev/usb [nick-nhusb]: if_smsc.c
Log Message:
Remove useless checks
To generate a diff of this commit:
cvs rdiff -u -r1.22.2.34 -r1.22.2.35 src/sys/dev/usb/if_smsc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/if_smsc.c
diff -u src/sys/dev/usb/if_smsc.c:1.22.2.34 src/sys/dev/usb/if_smsc.c:1.22.2.35
--- src/sys/dev/usb/if_smsc.c:1.22.2.34 Mon Feb 6 09:08:48 2017
+++ src/sys/dev/usb/if_smsc.c Mon Feb 6 10:20:01 2017
@@ -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 @@ smsc_miibus_statchg(struct ifnet *ifp)
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 @@ smsc_tick_task(void *xsc)
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);