summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorNick Hibma <n_hibma@FreeBSD.org>1999-02-21 16:53:35 +0000
committerNick Hibma <n_hibma@FreeBSD.org>1999-02-21 16:53:35 +0000
commit88cac66373365fa5ffc7d8ea4fd8a4f4152fa1d5 (patch)
treeb8ac86f1478818ec9a786a2afe89f52814705ca6 /sys/dev/usb/uhub.c
parentf96f6ae5d80968a2da330761b81f61215b3ad194 (diff)
Notes
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 04c4054b0739..5749f7766091 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -456,9 +456,14 @@ uhub_disconnect_port(up)
struct softc { /* all softc begin like this */
bdevice sc_dev;
};
+ struct softc *sc;
+ struct softc *scp;
- struct softc *sc = (struct softc *)dev->softc;
- struct softc *scp = (struct softc *)up->parent->softc;
+ if (!dev) /* no device driver attached at port */
+ return;
+
+ sc = (struct softc *)dev->softc;
+ scp = (struct softc *)up->parent->softc;
DPRINTFN(3,("uhub_disconnect_port: up=%p dev=%p port=%d\n",
up, dev, up->portno));