staging: comedi: usbduxsigma: fix errno (EL2NSYNC) check
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 25 Aug 2014 22:23:45 +0000 (15:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:20:50 +0000 (13:20 -0700)
These should both be checking the -errno.

Reported by: coverity
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbduxsigma.c

index 94a09c16de8b1cdf6fc7c4e662989ee2759281e8..da33b8c38d2e7c8fd7b96e4dfa0892c7ea451bb4 100644 (file)
@@ -451,7 +451,7 @@ static void usbduxsigma_ao_urb_complete(struct urb *urb)
                dev_err(dev->class_dev,
                        "%s: urb resubmit failed (%d)\n",
                        __func__, ret);
-               if (ret == EL2NSYNC)
+               if (ret == -EL2NSYNC)
                        dev_err(dev->class_dev,
                                "buggy USB host controller or bug in IRQ handler\n");
                usbduxsigma_ao_stop(dev, 0);    /* w/o unlink */
@@ -1148,7 +1148,7 @@ static void usbduxsigma_pwm_urb_complete(struct urb *urb)
        if (ret < 0) {
                dev_err(dev->class_dev, "%s: urb resubmit failed (%d)\n",
                        __func__, ret);
-               if (ret == EL2NSYNC)
+               if (ret == -EL2NSYNC)
                        dev_err(dev->class_dev,
                                "buggy USB host controller or bug in IRQ handler\n");
                usbduxsigma_pwm_stop(dev, 0);   /* w/o unlink */