diff --git a/components/drivers/usb/usbdevice/core/core.c b/components/drivers/usb/usbdevice/core/core.c index 312b186c6f..6c9409512c 100644 --- a/components/drivers/usb/usbdevice/core/core.c +++ b/components/drivers/usb/usbdevice/core/core.c @@ -813,9 +813,7 @@ uep_t rt_usbd_endpoint_create(uep_desc_t ep_desc, udep_handler_t handler) } ep->ep_desc = ep_desc; ep->handler = handler; - - /* allocate buffer for endpoint */ - ep->buffer = (rt_uint8_t*)rt_malloc(ep_desc->wMaxPacketSize); + ep->buffer = RT_NULL; return ep; }