Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61956
b: refs/heads/master
c: fb3abee
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jul 20, 2007
1 parent ed0aae2 commit 4ec7f1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84346269f9a05e66ff2973916776a080d566f9ab
refs/heads/master: fb3abee69de583180348b9029378e31574c31cfd
21 changes: 12 additions & 9 deletions trunk/drivers/usb/misc/iowarrior.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ static void iowarrior_callback(struct urb *urb)
int read_idx;
int aux_idx;
int offset;
int status;
int status = urb->status;
int retval;

switch (urb->status) {
switch (status) {
case 0:
/* success */
break;
Expand Down Expand Up @@ -213,10 +214,10 @@ static void iowarrior_callback(struct urb *urb)
wake_up_interruptible(&dev->read_wait);

exit:
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status)
retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval)
dev_err(&dev->interface->dev, "%s - usb_submit_urb failed with result %d",
__FUNCTION__, status);
__FUNCTION__, retval);

}

Expand All @@ -226,13 +227,15 @@ static void iowarrior_callback(struct urb *urb)
static void iowarrior_write_callback(struct urb *urb)
{
struct iowarrior *dev;
int status = urb->status;

dev = (struct iowarrior *)urb->context;
/* sync/async unlink faults aren't errors */
if (urb->status &&
!(urb->status == -ENOENT ||
urb->status == -ECONNRESET || urb->status == -ESHUTDOWN)) {
if (status &&
!(status == -ENOENT ||
status == -ECONNRESET || status == -ESHUTDOWN)) {
dbg("%s - nonzero write bulk status received: %d",
__func__, urb->status);
__func__, status);
}
/* free up our allocated buffer */
usb_buffer_free(urb->dev, urb->transfer_buffer_length,
Expand Down

0 comments on commit 4ec7f1d

Please sign in to comment.