staging: comedi: amplc_pci230: standardize error handling of subdev_8255_init()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 3 Feb 2014 17:43:27 +0000 (10:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 18:49:19 +0000 (10:49 -0800)
The subdev_8255_init() call returns 0 for success of a negative errno for failure.
For aesthetics, change the error test in this driver from (rc < 0) to simply (rc)
to follow the style of the other users of this function.

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/amplc_pci230.c

index c08dfbbe406227bff97cd82079b475681ef6297a..8b8b2ac4bf7f4050d5aae454f4d989734ce2a2e1 100644 (file)
@@ -2762,8 +2762,8 @@ static int pci230_attach_common(struct comedi_device *dev,
        /* digital i/o subdevice */
        if (thisboard->have_dio) {
                rc = subdev_8255_init(dev, s, NULL,
-                                     (devpriv->iobase1 + PCI230_PPI_X_BASE));
-               if (rc < 0)
+                                     devpriv->iobase1 + PCI230_PPI_X_BASE);
+               if (rc)
                        return rc;
        } else {
                s->type = COMEDI_SUBD_UNUSED;