ChangeSet 1.1867.3.11, 2004/09/14 12:00:27-07:00, [EMAIL PROTECTED]

[PATCH] USB: remove ugly code from usb/serial/usb-serial.c.

 This patch removes ugly code from some function in usb/serial/usb-serial.c
which is using a goto statement intead of a simple `return'.

 To be true, I'm not certain if there is a special reason to do that, if so
ignore me. ;)


Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/serial/usb-serial.c |   20 ++++----------------
 1 files changed, 4 insertions(+), 16 deletions(-)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   2004-10-19 08:13:32 -07:00
+++ b/drivers/usb/serial/usb-serial.c   2004-10-19 08:13:32 -07:00
@@ -621,15 +621,12 @@
 
        if (!port->open_count) {
                dbg ("%s - port not open", __FUNCTION__);
-               goto exit;
+               return;
        }
 
        /* pass on to the driver specific version of this function */
        if (port->serial->type->throttle)
                port->serial->type->throttle(port);
-
-exit:
-       ;
 }
 
 static void serial_unthrottle (struct tty_struct * tty)
@@ -640,15 +637,12 @@
 
        if (!port->open_count) {
                dbg("%s - port not open", __FUNCTION__);
-               goto exit;
+               return;
        }
 
        /* pass on to the driver specific version of this function */
        if (port->serial->type->unthrottle)
                port->serial->type->unthrottle(port);
-
-exit:
-       ;
 }
 
 static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int 
cmd, unsigned long arg)
@@ -681,15 +675,12 @@
 
        if (!port->open_count) {
                dbg("%s - port not open", __FUNCTION__);
-               goto exit;
+               return;
        }
 
        /* pass on to the driver specific version of this function if it is available 
*/
        if (port->serial->type->set_termios)
                port->serial->type->set_termios(port, old);
-
-exit:
-       ;
 }
 
 static void serial_break (struct tty_struct *tty, int break_state)
@@ -700,15 +691,12 @@
 
        if (!port->open_count) {
                dbg("%s - port not open", __FUNCTION__);
-               goto exit;
+               return;
        }
 
        /* pass on to the driver specific version of this function if it is available 
*/
        if (port->serial->type->break_ctl)
                port->serial->type->break_ctl(port, break_state);
-
-exit:
-       ;
 }
 
 static int serial_read_proc (char *page, char **start, off_t off, int count, int 
*eof, void *data)



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to