lkml.org 
[lkml]   [2004]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [linux-usb-devel] [PATCH] visor: Fix Oops on disconnect
    Greg KH wrote:
    > On Fri, May 21, 2004 at 03:51:23PM -0400, nardelli wrote:
    >
    >
    > Patch is line-wrapped, so I can't apply it :(
    >
    >

    Hmmm... I couldn't see the linewrap in the original I sent, or
    in test ones that I did. Probably my mail tool, but then it
    is getting late on a Friday, which probably means that it is me.

    To aid in diagnosing where I'm goofing up, could you point out
    a spot where it is linewrapping?


    >>@@ -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?
    >
    >
    >

    Yes - less clutter and more efficient too.

    >>+ 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...
    >
    >

    Yep - same comment as above.

    >>+ else {
    >>+ connection_info = (struct visor_connection_info *)
    >>+ transfer_buffer;
    >
    >
    >
    > greg k-h
    >


    --
    Joe Nardelli
    jnardelli@infosciences.com
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:03    [W:0.021 / U:30.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site