Skip to content

Commit 985a70a

Browse files
authored
Update hub.c
1 parent 10e0f28 commit 985a70a

File tree

1 file changed

+1
-0
lines changed
  • components/drivers/usb/usbhost/core

1 file changed

+1
-0
lines changed

components/drivers/usb/usbhost/core/hub.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ static rt_err_t rt_usbh_hub_enable(void *arg)
508508

509509
/* create a hub instance */
510510
hub = rt_malloc(sizeof(struct uhub));
511+
RT_ASSERT(hub != RT_NULL);
511512
rt_memset(hub, 0, sizeof(struct uhub));
512513

513514
/* make interface instance's user data point to hub instance */

0 commit comments

Comments
 (0)