Browse Source

check if urb is null in sunxi

sakimisu 2 years ago
parent
commit
cda6e48fc1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      port/musb/usb_hc_musb.c

+ 3 - 0
port/musb/usb_hc_musb.c

@@ -738,6 +738,9 @@ void handle_ep0(void)
 
     pipe = (struct musb_pipe *)&g_musb_hcd.pipe_pool[0][0];
     urb = pipe->urb;
+    if (urb == NULL) {
+        return;
+    }
 
     musb_set_active_ep(0);
     ep0_status = HWREGB(USB_BASE + MUSB_IND_TXCSRL_OFFSET);