USB: serial: use dev_err_console in generic write
authorJohan Hovold <jhovold@gmail.com>
Fri, 10 Feb 2012 12:20:50 +0000 (13:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Feb 2012 18:21:04 +0000 (10:21 -0800)
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>
drivers/usb/serial/generic.c

index e129fcd69fd9f6fc1f5b1440c30e29c90efc36df..2a2fa2d0489ddb9bfb2b156a2d57363550bbe21c 100644 (file)
@@ -217,10 +217,8 @@ retry:
        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;