Hi,

On 06/01/2011 02:22 PM, Gerd Hoffmann wrote:

What bug you are trying to fix here?

Nothing in particular, while looking at some other
stuff I noticed that we have the following sequence,
which is wrong:

usb_host_open called
 usb_host_open calls usb_host_claim_interfaces
  usb_host_claim_interfaces calls do_disconnect because of failure
   do_disconnect calls usb_host_close
    usb_host_close iterates over endpoints, but usb_linux_update_endp_table
      has not been called to initialize the endpoints at this points
    usb_host_close calls usb_device_detach, but not attached yet
    usb_host_close does an not needed ioctl(dev->fd, USBDEVFS_RESET);
    usb_host_closes the fd
 usb_host_open jumps to fail, closes the fd *again*

All of this is does not lead to any real user visible bugs,
but from a code flow pov it is wrong.

Regards,

Hans

Reply via email to