Commit 3f15f7cc authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: usbduxsigma: fix errno (EL2NSYNC) check

These should both be checking the -errno.

Reported by: coverity
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b419769
...@@ -451,7 +451,7 @@ static void usbduxsigma_ao_urb_complete(struct urb *urb) ...@@ -451,7 +451,7 @@ static void usbduxsigma_ao_urb_complete(struct urb *urb)
dev_err(dev->class_dev, dev_err(dev->class_dev,
"%s: urb resubmit failed (%d)\n", "%s: urb resubmit failed (%d)\n",
__func__, ret); __func__, ret);
if (ret == EL2NSYNC) if (ret == -EL2NSYNC)
dev_err(dev->class_dev, dev_err(dev->class_dev,
"buggy USB host controller or bug in IRQ handler\n"); "buggy USB host controller or bug in IRQ handler\n");
usbduxsigma_ao_stop(dev, 0); /* w/o unlink */ usbduxsigma_ao_stop(dev, 0); /* w/o unlink */
...@@ -1148,7 +1148,7 @@ static void usbduxsigma_pwm_urb_complete(struct urb *urb) ...@@ -1148,7 +1148,7 @@ static void usbduxsigma_pwm_urb_complete(struct urb *urb)
if (ret < 0) { if (ret < 0) {
dev_err(dev->class_dev, "%s: urb resubmit failed (%d)\n", dev_err(dev->class_dev, "%s: urb resubmit failed (%d)\n",
__func__, ret); __func__, ret);
if (ret == EL2NSYNC) if (ret == -EL2NSYNC)
dev_err(dev->class_dev, dev_err(dev->class_dev,
"buggy USB host controller or bug in IRQ handler\n"); "buggy USB host controller or bug in IRQ handler\n");
usbduxsigma_pwm_stop(dev, 0); /* w/o unlink */ usbduxsigma_pwm_stop(dev, 0); /* w/o unlink */
......
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