aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2010-02-27 14:55:26 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-19 10:24:15 -0400
commitd855fe2e9c19edaa47baba0e7f95e17f7a24dba8 (patch)
treefc6ac6e1c0a74ff70f1fbf67cb6bb85a1453f694 /drivers/usb/class
parent922a5eadd5a3aa0b806be0c18694b618d41d0784 (diff)
usb: cdc-wdm: Fix race between disconnect and debug messages
dev_dbg() and dev_err() cannot be used to report failures that may have been caused by a device's removal Signed-off-by: Oliver Neukum <neukum@b1-systems.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-wdm.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 940b17af162c..72e2eb030459 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -435,11 +435,8 @@ retry:
435 spin_lock_irq(&desc->iuspin); 435 spin_lock_irq(&desc->iuspin);
436 436
437 if (desc->rerr) { /* read completed, error happened */ 437 if (desc->rerr) { /* read completed, error happened */
438 int t = desc->rerr;
439 desc->rerr = 0; 438 desc->rerr = 0;
440 spin_unlock_irq(&desc->iuspin); 439 spin_unlock_irq(&desc->iuspin);
441 dev_err(&desc->intf->dev,
442 "reading had resulted in %d\n", t);
443 rv = -EIO; 440 rv = -EIO;
444 goto err; 441 goto err;
445 } 442 }
@@ -477,8 +474,6 @@ retry:
477 474
478err: 475err:
479 mutex_unlock(&desc->lock); 476 mutex_unlock(&desc->lock);
480 if (rv < 0 && rv != -EAGAIN)
481 dev_err(&desc->intf->dev, "wdm_read: exit error\n");
482 return rv; 477 return rv;
483} 478}
484 479