Skip to content

Commit

Permalink
USB: misc: usblcd: 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 a95a038 commit 0723af1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/usb/misc/usblcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
struct usb_lcd *dev;
int status = urb->status;

dev = (struct usb_lcd *)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("USBLCD: %s - nonzero write bulk status received: %d",
__FUNCTION__, urb->status);
__FUNCTION__, status);
}

/* free up our allocated buffer */
Expand Down

0 comments on commit 0723af1

Please sign in to comment.