Commit ee01e633 authored by Vincent Heuken's avatar Vincent Heuken Committed by Greg Kroah-Hartman

Staging: serqt_usb2: fixed frivolous else statement warnings

This is a patch to the serqt_usb2.c file that fixes three instances
of the following checkpatch.pl warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: default avatarVincent Heuken <me@vincentheuken.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0b913529
......@@ -982,9 +982,8 @@ static void qt_block_until_empty(struct tty_struct *tty,
if (wait == 0) {
dev_dbg(&qt_port->port->dev, "%s - TIMEOUT", __func__);
return;
} else {
wait = 30;
}
wait = 30;
}
}
......@@ -1120,6 +1119,7 @@ static int qt_ioctl(struct tty_struct *tty,
struct usb_serial_port *port = tty->driver_data;
struct quatech_port *qt_port = qt_get_port_private(port);
unsigned int index;
char diff;
dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd);
......@@ -1133,8 +1133,8 @@ static int qt_ioctl(struct tty_struct *tty,
#endif
if (signal_pending(current))
return -ERESTARTSYS;
else {
char diff = qt_port->diff_status;
diff = qt_port->diff_status;
if (diff == 0)
return -EIO; /* no change => error */
......@@ -1153,7 +1153,6 @@ static int qt_ioctl(struct tty_struct *tty,
return 0;
}
}
}
return 0;
}
......@@ -1379,7 +1378,7 @@ static inline int qt_real_tiocmset(struct tty_struct *tty,
box_set_register(port->serial, index, MODEM_CONTROL_REGISTER, mcr);
if (status < 0)
return -ESPIPE;
else
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment