On Fri, May 21, 2004 at 03:51:23PM -0400, nardelli wrote:
Patch is line-wrapped, so I can't apply it :(
@@ -456,7 +460,8 @@ static void visor_close (struct usb_seri
return;
/* shutdown our urbs */
- usb_unlink_urb (port->read_urb);
+ if (port->read_urb)
+ usb_unlink_urb (port->read_urb);
I really do not think these extra checks for read_urb all of the place
need to be added. We take care of it in the open() call, right?
+ else if (retval != sizeof(*connection_info)) {
+ /* real invalid connection info handling is below */
+ num_ports = 0;
+ }
Change this to a "if" instead of a "else if".
Actually just set num_ports to 0 at the beginning of the function, and
then just check for a valud retval and do the code below...
+ else {
+ connection_info = (struct visor_connection_info *)
+ transfer_buffer;
greg k-h