From 985a70ab155da7bc06635409f0ab5e6c8a6561a0 Mon Sep 17 00:00:00 2001 From: David Lin Date: Sat, 21 Mar 2020 20:56:31 +0800 Subject: [PATCH] Update hub.c --- components/drivers/usb/usbhost/core/hub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/drivers/usb/usbhost/core/hub.c b/components/drivers/usb/usbhost/core/hub.c index 80ed9b4e3f..fb6cd9c406 100644 --- a/components/drivers/usb/usbhost/core/hub.c +++ b/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 */