Skip to content

Commit

Permalink
USB: serial: fix console error reporting
Browse files Browse the repository at this point in the history
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: Stephen Hemminger <shemminger@vyatta.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Feb 10, 2012
1 parent e688355 commit 548dd4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/serial/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
dev_err(&port->dev, "%s - error submitting urb: %d\n",
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;
Expand Down

0 comments on commit 548dd4b

Please sign in to comment.