diff options
Diffstat (limited to 'nuttx/drivers/usbhost/usbhost_skeleton.c')
-rw-r--r-- | nuttx/drivers/usbhost/usbhost_skeleton.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_skeleton.c b/nuttx/drivers/usbhost/usbhost_skeleton.c index c33dda586..206b347c5 100644 --- a/nuttx/drivers/usbhost/usbhost_skeleton.c +++ b/nuttx/drivers/usbhost/usbhost_skeleton.c @@ -673,14 +673,6 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) } } - /* Disconnect on any errors detected during volume initialization */ - - if (ret != OK) - { - udbg("ERROR! Aborting: %d\n", ret); - usbhost_destroy(priv); - } - return ret; } @@ -924,6 +916,10 @@ static FAR struct usbhost_class_s *usbhost_create(FAR struct usbhost_driver_s *d * On success, zero (OK) is returned. On a failure, a negated errno value is * returned indicating the nature of the failure * + * NOTE that the class instance remains valid upon return with a failure. It is + * the responsibility of the higher level enumeration logic to call + * CLASS_DISCONNECTED to free up the class driver resources. + * * Assumptions: * - This function will *not* be called from an interrupt handler. * - If this function returns an error, the USB host controller driver |