Commit 0723af13 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: misc: usblcd: 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 a95a0381
...@@ -176,16 +176,17 @@ static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u ...@@ -176,16 +176,17 @@ static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
static void lcd_write_bulk_callback(struct urb *urb) static void lcd_write_bulk_callback(struct urb *urb)
{ {
struct usb_lcd *dev; struct usb_lcd *dev;
int status = urb->status;
dev = (struct usb_lcd *)urb->context; dev = (struct usb_lcd *)urb->context;
/* sync/async unlink faults aren't errors */ /* sync/async unlink faults aren't errors */
if (urb->status && if (status &&
!(urb->status == -ENOENT || !(status == -ENOENT ||
urb->status == -ECONNRESET || status == -ECONNRESET ||
urb->status == -ESHUTDOWN)) { status == -ESHUTDOWN)) {
dbg("USBLCD: %s - nonzero write bulk status received: %d", dbg("USBLCD: %s - nonzero write bulk status received: %d",
__FUNCTION__, urb->status); __FUNCTION__, status);
} }
/* free up our allocated buffer */ /* free up our allocated buffer */
......
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