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

Commit 548dd4b6 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: serial: fix console error reporting



Do not report errors in write path if port is used as a console as this
may trigger the same error (and error report) resulting in a loop.

Reported-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e688355b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -217,8 +217,10 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port)
	clear_bit(i, &port->write_urbs_free);
	result = usb_submit_urb(urb, GFP_ATOMIC);
	if (result) {
		if (!port->port.console) {
			dev_err(&port->dev, "%s - error submitting urb: %d\n",
						__func__, result);
		}
		set_bit(i, &port->write_urbs_free);
		spin_lock_irqsave(&port->lock, flags);
		port->tx_bytes -= count;