]> err.no Git - linux-2.6/blobdiff - drivers/usb/serial/mos7840.c
USB: mos7840: Clean up old checks and stuff
[linux-2.6] / drivers / usb / serial / mos7840.c
index 37f41f576d3d9db9d2fee3ec412c69a0ad4441a4..a5ced7e08cbfc05ca9417b8dd42fd61c624ed27c 100644 (file)
@@ -436,11 +436,6 @@ static void mos7840_control_callback(struct urb *urb)
        int result = 0;
        int status = urb->status;
 
-       if (!urb) {
-               dbg("%s", "Invalid Pointer !!!!:\n");
-               return;
-       }
-
        mos7840_port = (struct moschip_port *)urb->context;
 
        switch (status) {
@@ -525,10 +520,6 @@ static void mos7840_interrupt_callback(struct urb *urb)
        int status = urb->status;
 
        dbg("%s", " : Entering\n");
-       if (!urb) {
-               dbg("%s", "Invalid Pointer !!!!:\n");
-               return;
-       }
 
        switch (status) {
        case 0:
@@ -676,11 +667,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
        struct tty_struct *tty;
        int status = urb->status;
 
-       if (!urb) {
-               dbg("%s", "Invalid Pointer !!!!:\n");
-               return;
-       }
-
        if (status) {
                dbg("nonzero read bulk status received: %d", status);
                return;
@@ -753,11 +739,6 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
        int status = urb->status;
        int i;
 
-       if (!urb) {
-               dbg("%s", "Invalid Pointer !!!!:\n");
-               return;
-       }
-
        mos7840_port = (struct moschip_port *)urb->context;
        spin_lock(&mos7840_port->pool_lock);
        for (i = 0; i < NUM_URBS; i++) {
@@ -1996,11 +1977,6 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
 
        tty = mos7840_port->port->tty;
 
-       if ((!tty) || (!tty->termios)) {
-               dbg("%s - no tty structures", __FUNCTION__);
-               return;
-       }
-
        dbg("%s", "Entering .......... \n");
 
        lData = LCR_BITS_8;
@@ -2170,11 +2146,6 @@ static void mos7840_set_termios(struct usb_serial_port *port,
 
        tty = port->tty;
 
-       if (!port->tty || !port->tty->termios) {
-               dbg("%s - no tty or termios", __FUNCTION__);
-               return;
-       }
-
        if (!mos7840_port->open) {
                dbg("%s - port not opened", __FUNCTION__);
                return;
@@ -2184,19 +2155,10 @@ static void mos7840_set_termios(struct usb_serial_port *port,
 
        cflag = tty->termios->c_cflag;
 
-       if (!cflag) {
-               dbg("%s %s\n", __FUNCTION__, "cflag is NULL");
-               return;
-       }
-
        dbg("%s - clfag %08x iflag %08x", __FUNCTION__,
            tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag));
-
-       if (old_termios) {
-               dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
-                   old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag));
-       }
-
+       dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
+           old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag));
        dbg("%s - port %d", __FUNCTION__, port->number);
 
        /* change the port settings to the new ones specified */