summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2002-04-07 10:31:39 +0000
committerjoe <joe@FreeBSD.org>2002-04-07 10:31:39 +0000
commita1017d39340cf5b4a547ab5fbbf73c41726030e4 (patch)
treedbd7d2e496e8912a5715459d51a7da8b50387cd3 /sys/dev
parent6567ae608c2ed0f19b715b66d97d6a8f703d6d8f (diff)
downloadFreeBSD-src-a1017d39340cf5b4a547ab5fbbf73c41726030e4.zip
FreeBSD-src-a1017d39340cf5b4a547ab5fbbf73c41726030e4.tar.gz
MFNetBSD:
revision 1.52 date: 2001/10/26 17:53:59; author: augustss; state: Exp; lines: +8 -2 Compare pointer with NULL instead of using them as a condition.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uhub.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 3b7fcf4..8234ba1 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhub.c,v 1.51 2001/10/24 15:30:17 augustss Exp $ */
+/* $NetBSD: uhub.c,v 1.52 2001/10/26 17:53:59 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -388,8 +388,14 @@ uhub_explore(usbd_device_handle dev)
DPRINTFN(3,("uhub_explore: port=%d !C_CONNECT_"
"STATUS\n", port));
/* No status change, just do recursive explore. */
- if (up->device && up->device->hub)
+ if (up->device != NULL && up->device->hub != NULL)
up->device->hub->explore(up->device);
+#if 0 && defined(DIAGNOSTIC)
+ if (up->device == NULL &&
+ (status & UPS_CURRENT_CONNECT_STATUS))
+ printf("%s: connected, no device\n",
+ USBDEVNAME(sc->sc_dev));
+#endif
continue;
}
OpenPOWER on IntegriCloud