staging: comedi: usbdux: fix errno (EL2NSYNC) check
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 25 Aug 2014 22:23:47 +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/usbdux.c

index 053bc50905303bcb5839f3b753435a60c43487a9..ad0faf5c2fad605dcef856ccb9410236a46402ef 100644 (file)
@@ -513,7 +513,7 @@ static void usbduxsub_ao_isoc_irq(struct urb *urb)
                        dev_err(dev->class_dev,
                                "ao urb resubm failed in int-cont. ret=%d",
                                ret);
-                       if (ret == EL2NSYNC)
+                       if (ret == -EL2NSYNC)
                                dev_err(dev->class_dev,
                                        "buggy USB host controller or bug in IRQ handling!\n");
 
@@ -1294,7 +1294,7 @@ static void usbduxsub_pwm_irq(struct urb *urb)
                        dev_err(dev->class_dev,
                                "pwm urb resubm failed in int-cont. ret=%d",
                                ret);
-                       if (ret == EL2NSYNC)
+                       if (ret == -EL2NSYNC)
                                dev_err(dev->class_dev,
                                        "buggy USB host controller or bug in IRQ handling!\n");