summaryrefslogtreecommitdiff
path: root/components/drivers/usb
diff options
context:
space:
mode:
authorDavid Lin <[email protected]>2020-03-21 20:56:31 +0800
committerGitHub <[email protected]>2020-03-21 20:56:31 +0800
commit985a70ab155da7bc06635409f0ab5e6c8a6561a0 (patch)
tree44ee1852f0c2cd6b88810b9d2d4b05eacb84173a /components/drivers/usb
parent10e0f2875428f453e22b77ce194719710c40da07 (diff)
Update hub.c
Diffstat (limited to 'components/drivers/usb')
-rw-r--r--components/drivers/usb/usbhost/core/hub.c1
1 files changed, 1 insertions, 0 deletions
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 */