Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2f007de2f4296e4dafae6ab0b3cc1bc49443137a
Commit:     2f007de2f4296e4dafae6ab0b3cc1bc49443137a
Parent:     9306fff17d3852e088dfc512e6f6673f3d80e71e
Author:     Oliver Neukum <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 29 10:45:17 2007 +0200
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:28:38 2007 -0700

    USB: fix error handling for mct_u232
    
    we report errors to the caller. THis patch adds error handling to the 
driver.
    
    Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/mct_u232.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index 4cd839b..3db1adc 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -438,17 +438,21 @@ static int  mct_u232_open (struct usb_serial_port *port, 
struct file *filp)
        if (retval) {
                err("usb_submit_urb(read bulk) failed pipe 0x%x err %d",
                    port->read_urb->pipe, retval);
-               goto exit;
+               goto error;
        }
 
        port->interrupt_in_urb->dev = port->serial->dev;
        retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
-       if (retval)
+       if (retval) {
+               usb_kill_urb(port->read_urb);
                err(" usb_submit_urb(read int) failed pipe 0x%x err %d",
                    port->interrupt_in_urb->pipe, retval);
-
-exit:
+               goto error;
+       }
        return 0;
+
+error:
+       return retval;
 } /* mct_u232_open */
 
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to