diff
 void hub_get(struct usb_hub *hub)
 {
+    if (!hub)
+        return;
     kref_get(&hub->kref);
 }
