Skip to content

Commit

Permalink
USB: misc: ftdi-elan: clean up urb->status usage
Browse files Browse the repository at this point in the history
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jul 20, 2007
1 parent 22bea33 commit 8434626
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/usb/misc/ftdi-elan.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,12 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer,
static void ftdi_elan_write_bulk_callback(struct urb *urb)
{
struct usb_ftdi *ftdi = (struct usb_ftdi *)urb->context;
if (urb->status && !(urb->status == -ENOENT || urb->status ==
-ECONNRESET || urb->status == -ESHUTDOWN)) {
int status = urb->status;

if (status && !(status == -ENOENT || status == -ECONNRESET ||
status == -ESHUTDOWN)) {
dev_err(&ftdi->udev->dev, "urb=%p write bulk status received: %"
"d\n", urb, urb->status);
"d\n", urb, status);
}
usb_buffer_free(urb->dev, urb->transfer_buffer_length,
urb->transfer_buffer, urb->transfer_dma);
Expand Down

0 comments on commit 8434626

Please sign in to comment.