Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a3ae841 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

USB: keyspan: pull in one indent level



We can remove the "if (urb->actual_length) {" check because checking for
"while (i < urb->actual_length) {" is sufficient.  This lets us pull the
code in one indent level.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ca2cd29
Loading
Loading
Loading
Loading
+34 −35
Original line number Diff line number Diff line
@@ -726,7 +726,6 @@ static void usa49wg_indat_callback(struct urb *urb)
	i = 0;
	len = 0;

	if (urb->actual_length) {
	while (i < urb->actual_length) {

		/* Check port number from message */
@@ -751,6 +750,7 @@ static void usa49wg_indat_callback(struct urb *urb)
			 */
			for (x = 0; x + 1 < len; x += 2) {
				int stat = data[i], flag = 0;

				if (stat & RXERROR_OVERRUN)
					flag |= TTY_OVERRUN;
				if (stat & RXERROR_FRAMING)
@@ -758,14 +758,13 @@ static void usa49wg_indat_callback(struct urb *urb)
				if (stat & RXERROR_PARITY)
					flag |= TTY_PARITY;
				/* XXX should handle break (0x10) */
					tty_insert_flip_char(&port->port,
							data[i+1], flag);
				tty_insert_flip_char(&port->port, data[i+1],
						     flag);
				i += 2;
			}
		}
		tty_flip_buffer_push(&port->port);
	}
	}

	/* Resubmit urb so we continue receiving */
	err = usb_submit_urb(urb, GFP_ATOMIC);