소스 검색

Update hub.c

David Lin 5 년 전
부모
커밋
985a70ab15
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      components/drivers/usb/usbhost/core/hub.c

+ 1 - 0
components/drivers/usb/usbhost/core/hub.c

@@ -508,6 +508,7 @@ static rt_err_t rt_usbh_hub_enable(void *arg)
 
     /* create a hub instance */
     hub = rt_malloc(sizeof(struct uhub));
+    RT_ASSERT(hub != RT_NULL);
     rt_memset(hub, 0, sizeof(struct uhub));
     
     /* make interface instance's user data point to hub instance */