Update ecm.c

This commit is contained in:
David Lin 2020-03-21 20:42:55 +08:00 committed by GitHub
parent 30a9ef64c1
commit 3679dfa07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -565,7 +565,8 @@ ufunction_t rt_usbd_function_ecm_create(udevice_t device)
/* create a cdc class */
cdc = rt_usbd_function_new(device, &_dev_desc, &ops);
rt_usbd_device_set_qualifier(device, &dev_qualifier);
_ecm_eth= rt_malloc(sizeof(struct rt_ecm_eth));
_ecm_eth= rt_malloc(sizeof(struct rt_ecm_eth));
RT_ASSERT(_ecm_eth != RT_NULL);
rt_memset(_ecm_eth, 0, sizeof(struct rt_ecm_eth));
cdc->user_data = _ecm_eth;