Skip to content

Commit

Permalink
USB: serial: use dev_err_console in generic write
Browse files Browse the repository at this point in the history
Use dev_err_console in write path so that an error at least gets
reported once.

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 548dd4b commit f1475a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/serial/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,8 @@ 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",
dev_err_console(port, "%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 f1475a0

Please sign in to comment.