ldube commented on code in PR #8879:
URL: https://github.com/apache/nuttx/pull/8879#discussion_r1146292074


##########
drivers/usbhost/usbhost_hub.c:
##########
@@ -965,12 +965,34 @@ static void usbhost_hub_event(FAR void *arg)
               if (connport->devclass != NULL)
                 {
                   CLASS_DISCONNECTED(connport->devclass);
-                  connport->devclass = NULL;
-                }
 
-              /* Free any resources used by the hub port */
+                  if (connport->devclass->connect == usbhost_connect)

Review Comment:
   This is how I check for a hub. Only the hub class will set connect to the 
usbhost_connect function in this file. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to