summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authoraugustss <augustss@NetBSD.org>2001-10-26 17:53:59 +0000
committeraugustss <augustss@NetBSD.org>2001-10-26 17:53:59 +0000
commitdc901ef1f39fbec980cc4c1d41b00a69f9fb2f79 (patch)
treed24deb96da23ad38abf545acead8becd9b97b71c /sys/dev/usb
parent9f786f908f6f0e737ea0bee174145d132c489b5d (diff)
Compare pointer with NULL instead of using them as a condition.
Diffstat (limited to 'sys/dev/usb')
-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 8bf53dc0c88..a12d1f8a127 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: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/*
@@ -371,8 +371,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;
}