diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/class/usblp.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 80ec1039d670..5192cd9356de 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -289,16 +289,17 @@ static int proto_bias = -1; | |||
289 | static void usblp_bulk_read(struct urb *urb) | 289 | static void usblp_bulk_read(struct urb *urb) |
290 | { | 290 | { |
291 | struct usblp *usblp = urb->context; | 291 | struct usblp *usblp = urb->context; |
292 | int status = urb->status; | ||
292 | 293 | ||
293 | if (usblp->present && usblp->used) { | 294 | if (usblp->present && usblp->used) { |
294 | if (urb->status) | 295 | if (status) |
295 | printk(KERN_WARNING "usblp%d: " | 296 | printk(KERN_WARNING "usblp%d: " |
296 | "nonzero read bulk status received: %d\n", | 297 | "nonzero read bulk status received: %d\n", |
297 | usblp->minor, urb->status); | 298 | usblp->minor, status); |
298 | } | 299 | } |
299 | spin_lock(&usblp->lock); | 300 | spin_lock(&usblp->lock); |
300 | if (urb->status < 0) | 301 | if (status < 0) |
301 | usblp->rstatus = urb->status; | 302 | usblp->rstatus = status; |
302 | else | 303 | else |
303 | usblp->rstatus = urb->actual_length; | 304 | usblp->rstatus = urb->actual_length; |
304 | usblp->rcomplete = 1; | 305 | usblp->rcomplete = 1; |
@@ -311,16 +312,17 @@ static void usblp_bulk_read(struct urb *urb) | |||
311 | static void usblp_bulk_write(struct urb *urb) | 312 | static void usblp_bulk_write(struct urb *urb) |
312 | { | 313 | { |
313 | struct usblp *usblp = urb->context; | 314 | struct usblp *usblp = urb->context; |
315 | int status = urb->status; | ||
314 | 316 | ||
315 | if (usblp->present && usblp->used) { | 317 | if (usblp->present && usblp->used) { |
316 | if (urb->status) | 318 | if (status) |
317 | printk(KERN_WARNING "usblp%d: " | 319 | printk(KERN_WARNING "usblp%d: " |
318 | "nonzero write bulk status received: %d\n", | 320 | "nonzero write bulk status received: %d\n", |
319 | usblp->minor, urb->status); | 321 | usblp->minor, status); |
320 | } | 322 | } |
321 | spin_lock(&usblp->lock); | 323 | spin_lock(&usblp->lock); |
322 | if (urb->status < 0) | 324 | if (status < 0) |
323 | usblp->wstatus = urb->status; | 325 | usblp->wstatus = status; |
324 | else | 326 | else |
325 | usblp->wstatus = urb->actual_length; | 327 | usblp->wstatus = urb->actual_length; |
326 | usblp->wcomplete = 1; | 328 | usblp->wcomplete = 1; |