aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-02-27 08:05:46 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-19 10:24:02 -0400
commit0ae1474367a15e1b65a9deed3a73a14475a419fc (patch)
treeba38aabd211496cea697eb4684d9b8ad81997ae6 /drivers/usb
parent7152b592593b9d48b33f8997b1dfd6df9143f7ec (diff)
USB: serial: fix error message on close in generic driver
Resubmitting read urb fails with -EPERM if completion handler runs while urb is being killed on close. This should not be reported as an error. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/generic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 89fac36684c5..e560d1d7f628 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -415,11 +415,13 @@ void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port,
415 ((serial->type->read_bulk_callback) ? 415 ((serial->type->read_bulk_callback) ?
416 serial->type->read_bulk_callback : 416 serial->type->read_bulk_callback :
417 usb_serial_generic_read_bulk_callback), port); 417 usb_serial_generic_read_bulk_callback), port);
418
418 result = usb_submit_urb(urb, mem_flags); 419 result = usb_submit_urb(urb, mem_flags);
419 if (result) 420 if (result && result != -EPERM) {
420 dev_err(&port->dev, 421 dev_err(&port->dev,
421 "%s - failed resubmitting read urb, error %d\n", 422 "%s - failed resubmitting read urb, error %d\n",
422 __func__, result); 423 __func__, result);
424 }
423} 425}
424EXPORT_SYMBOL_GPL(usb_serial_generic_resubmit_read_urb); 426EXPORT_SYMBOL_GPL(usb_serial_generic_resubmit_read_urb);
425 427