summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakimisu <[email protected]>2023-03-12 14:56:29 +0800
committersakimisu <[email protected]>2023-03-12 14:56:29 +0800
commitcda6e48fc11497ed1edc8e4467d9d5719f528633 (patch)
tree444768bb909759dda79dc124e01f1bb00c4cb995
parent854e633808b6a6f7c5a9201f824f46671645028d (diff)
check if urb is null in sunxi
-rw-r--r--port/musb/usb_hc_musb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/port/musb/usb_hc_musb.c b/port/musb/usb_hc_musb.c
index d55dc561..75414461 100644
--- a/port/musb/usb_hc_musb.c
+++ b/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);