diff options
Diffstat (limited to 'nuttx/drivers/usbhost/usbhost_enumerate.c')
-rwxr-xr-x | nuttx/drivers/usbhost/usbhost_enumerate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_enumerate.c b/nuttx/drivers/usbhost/usbhost_enumerate.c index 1c3a827bf..8e1cd80e7 100755 --- a/nuttx/drivers/usbhost/usbhost_enumerate.c +++ b/nuttx/drivers/usbhost/usbhost_enumerate.c @@ -249,6 +249,10 @@ static inline int usbhost_classbind(FAR struct usbhost_driver_s *drvr, ret = CLASS_CONNECT(devclass, configdesc, desclen, funcaddr); if (ret != OK) { + /* On failures, call the class disconnect method which + * should then free the allocated devclass instance. + */ + udbg("CLASS_CONNECT failed: %d\n", ret); CLASS_DISCONNECTED(devclass); } |