Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: misc: phidgetmotorcontrol: 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: Greg Kroah-Hartman <gregkh@suse.de>

+7 -6
+7 -6
drivers/usb/misc/phidgetmotorcontrol.c
··· 95 95 struct motorcontrol *mc = urb->context; 96 96 unsigned char *buffer = mc->data; 97 97 int i, level; 98 - int status; 98 + int retval; 99 + int status = urb->status;; 99 100 100 - switch (urb->status) { 101 + switch (status) { 101 102 case 0: /* success */ 102 103 break; 103 104 case -ECONNRESET: /* unlink */ ··· 152 151 schedule_delayed_work(&mc->do_notify, 0); 153 152 154 153 resubmit: 155 - status = usb_submit_urb(urb, GFP_ATOMIC); 156 - if (status) 154 + retval = usb_submit_urb(urb, GFP_ATOMIC); 155 + if (retval) 157 156 dev_err(&mc->intf->dev, 158 - "can't resubmit intr, %s-%s/motorcontrol0, status %d", 157 + "can't resubmit intr, %s-%s/motorcontrol0, retval %d", 159 158 mc->udev->bus->bus_name, 160 - mc->udev->devpath, status); 159 + mc->udev->devpath, retval); 161 160 } 162 161 163 162 static void do_notify(struct work_struct *work)