Commit 84346269 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: misc: ftdi-elan: clean up urb->status usage

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 22bea334
...@@ -747,10 +747,12 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer, ...@@ -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) static void ftdi_elan_write_bulk_callback(struct urb *urb)
{ {
struct usb_ftdi *ftdi = (struct usb_ftdi *)urb->context; struct usb_ftdi *ftdi = (struct usb_ftdi *)urb->context;
if (urb->status && !(urb->status == -ENOENT || urb->status == int status = urb->status;
-ECONNRESET || urb->status == -ESHUTDOWN)) {
if (status && !(status == -ENOENT || status == -ECONNRESET ||
status == -ESHUTDOWN)) {
dev_err(&ftdi->udev->dev, "urb=%p write bulk status received: %" 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, usb_buffer_free(urb->dev, urb->transfer_buffer_length,
urb->transfer_buffer, urb->transfer_dma); urb->transfer_buffer, urb->transfer_dma);
......
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