diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c index 3cf72ab7845e6e8204dae75b7b4da90aaebbb65f..2d5e9e5c4fed80424280c61deead1142904267c3 100644 --- a/sys/dev/usb/usb_hub.c +++ b/sys/dev/usb/usb_hub.c @@ -2891,6 +2891,10 @@ repeat: } } + /* be NULL safe */ + if (udev->bus == NULL) + return; + USB_BUS_LOCK(udev->bus); /* * Checking for suspend condition and setting suspended bit