aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/ldusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/ldusb.c')
-rw-r--r--drivers/usb/misc/ldusb.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index 5e950b90c541..8208496dfc63 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -219,16 +219,17 @@ static void ld_usb_interrupt_in_callback(struct urb *urb)
219 struct ld_usb *dev = urb->context; 219 struct ld_usb *dev = urb->context;
220 size_t *actual_buffer; 220 size_t *actual_buffer;
221 unsigned int next_ring_head; 221 unsigned int next_ring_head;
222 int status = urb->status;
222 int retval; 223 int retval;
223 224
224 if (urb->status) { 225 if (status) {
225 if (urb->status == -ENOENT || 226 if (status == -ENOENT ||
226 urb->status == -ECONNRESET || 227 status == -ECONNRESET ||
227 urb->status == -ESHUTDOWN) { 228 status == -ESHUTDOWN) {
228 goto exit; 229 goto exit;
229 } else { 230 } else {
230 dbg_info(&dev->intf->dev, "%s: nonzero status received: %d\n", 231 dbg_info(&dev->intf->dev, "%s: nonzero status received: %d\n",
231 __FUNCTION__, urb->status); 232 __FUNCTION__, status);
232 spin_lock(&dev->rbsl); 233 spin_lock(&dev->rbsl);
233 goto resubmit; /* maybe we can recover */ 234 goto resubmit; /* maybe we can recover */
234 } 235 }
@@ -275,14 +276,15 @@ exit:
275static void ld_usb_interrupt_out_callback(struct urb *urb) 276static void ld_usb_interrupt_out_callback(struct urb *urb)
276{ 277{
277 struct ld_usb *dev = urb->context; 278 struct ld_usb *dev = urb->context;
279 int status = urb->status;
278 280
279 /* sync/async unlink faults aren't errors */ 281 /* sync/async unlink faults aren't errors */
280 if (urb->status && !(urb->status == -ENOENT || 282 if (status && !(status == -ENOENT ||
281 urb->status == -ECONNRESET || 283 status == -ECONNRESET ||
282 urb->status == -ESHUTDOWN)) 284 status == -ESHUTDOWN))
283 dbg_info(&dev->intf->dev, 285 dbg_info(&dev->intf->dev,
284 "%s - nonzero write interrupt status received: %d\n", 286 "%s - nonzero write interrupt status received: %d\n",
285 __FUNCTION__, urb->status); 287 __FUNCTION__, status);
286 288
287 dev->interrupt_out_busy = 0; 289 dev->interrupt_out_busy = 0;
288 wake_up_interruptible(&dev->write_wait); 290 wake_up_interruptible(&dev->write_wait);