Commit d855fe2e authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

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: default avatarOliver Neukum <neukum@b1-systems.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 922a5ead
...@@ -435,11 +435,8 @@ retry: ...@@ -435,11 +435,8 @@ retry:
spin_lock_irq(&desc->iuspin); spin_lock_irq(&desc->iuspin);
if (desc->rerr) { /* read completed, error happened */ if (desc->rerr) { /* read completed, error happened */
int t = desc->rerr;
desc->rerr = 0; desc->rerr = 0;
spin_unlock_irq(&desc->iuspin); spin_unlock_irq(&desc->iuspin);
dev_err(&desc->intf->dev,
"reading had resulted in %d\n", t);
rv = -EIO; rv = -EIO;
goto err; goto err;
} }
...@@ -477,8 +474,6 @@ retry: ...@@ -477,8 +474,6 @@ retry:
err: err:
mutex_unlock(&desc->lock); mutex_unlock(&desc->lock);
if (rv < 0 && rv != -EAGAIN)
dev_err(&desc->intf->dev, "wdm_read: exit error\n");
return rv; return rv;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment