Skip to content

Commit

Permalink
usb: cdc-wdm: Fix race between disconnect and debug messages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and gregkh committed Mar 19, 2010
1 parent 922a5ea commit d855fe2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/usb/class/cdc-wdm.c
Expand Up @@ -435,11 +435,8 @@ static ssize_t wdm_read
spin_lock_irq(&desc->iuspin);

if (desc->rerr) { /* read completed, error happened */
int t = desc->rerr;
desc->rerr = 0;
spin_unlock_irq(&desc->iuspin);
dev_err(&desc->intf->dev,
"reading had resulted in %d\n", t);
rv = -EIO;
goto err;
}
Expand Down Expand Up @@ -477,8 +474,6 @@ static ssize_t wdm_read

err:
mutex_unlock(&desc->lock);
if (rv < 0 && rv != -EAGAIN)
dev_err(&desc->intf->dev, "wdm_read: exit error\n");
return rv;
}

Expand Down

0 comments on commit d855fe2

Please sign in to comment.