Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb We cannot use DPRINTF(sc, ...) when sc is not in...
details: https://anonhg.NetBSD.org/src/rev/f06d3ee1c5e8
branches: trunk
changeset: 448671:f06d3ee1c5e8
user: rin <rin%NetBSD.org@localhost>
date: Wed Feb 06 22:42:11 2019 +0000
description:
We cannot use DPRINTF(sc, ...) when sc is not initialized.
diffstat:
sys/dev/usb/if_mue.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (41 lines):
diff -r 31a0d66f975d -r f06d3ee1c5e8 sys/dev/usb/if_mue.c
--- a/sys/dev/usb/if_mue.c Wed Feb 06 22:38:10 2019 +0000
+++ b/sys/dev/usb/if_mue.c Wed Feb 06 22:42:11 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mue.c,v 1.39 2019/02/06 09:15:01 rin Exp $ */
+/* $NetBSD: if_mue.c,v 1.40 2019/02/06 22:42:11 rin Exp $ */
/* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */
/*
@@ -20,7 +20,7 @@
/* Driver for Microchip LAN7500/LAN7800 chipsets. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.39 2019/02/06 09:15:01 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.40 2019/02/06 22:42:11 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -364,18 +364,18 @@
uint32_t flow, threshold;
if (ifp == NULL) {
- DPRINTF(sc, "ifp not ready\n");
+ printf("%s: ifp not ready\n", __func__);
return;
}
+ sc = ifp->if_softc;
+ mii = GET_MII(sc);
+
if ((ifp->if_flags & IFF_RUNNING) == 0) {
DPRINTF(sc, "not running\n");
return;
}
- sc = ifp->if_softc;
- mii = GET_MII(sc);
-
if (mii == NULL) {
DPRINTF(sc, "mii not ready\n");
return;
Home |
Main Index |
Thread Index |
Old Index