Commit 2fe8c3f1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: misc: phidgetkit: 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 64771a0f
...@@ -305,9 +305,10 @@ static void interfacekit_irq(struct urb *urb) ...@@ -305,9 +305,10 @@ static void interfacekit_irq(struct urb *urb)
struct interfacekit *kit = urb->context; struct interfacekit *kit = urb->context;
unsigned char *buffer = kit->data; unsigned char *buffer = kit->data;
int i, level, sensor; int i, level, sensor;
int status; int retval;
int status = urb->status;
switch (urb->status) { switch (status) {
case 0: /* success */ case 0: /* success */
break; break;
case -ECONNRESET: /* unlink */ case -ECONNRESET: /* unlink */
...@@ -377,11 +378,11 @@ static void interfacekit_irq(struct urb *urb) ...@@ -377,11 +378,11 @@ static void interfacekit_irq(struct urb *urb)
schedule_delayed_work(&kit->do_notify, 0); schedule_delayed_work(&kit->do_notify, 0);
resubmit: resubmit:
status = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (status) if (retval)
err("can't resubmit intr, %s-%s/interfacekit0, status %d", err("can't resubmit intr, %s-%s/interfacekit0, retval %d",
kit->udev->bus->bus_name, kit->udev->bus->bus_name,
kit->udev->devpath, status); kit->udev->devpath, retval);
} }
static void do_notify(struct work_struct *work) static void do_notify(struct work_struct *work)
......
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