mirror of https://gitee.com/openkylin/linux.git
staging: comedi: amplc_pci230: standardize error handling of subdev_8255_init()
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>
This commit is contained in:
parent
46828a56f2
commit
ce921ae419
|
@ -2762,8 +2762,8 @@ static int pci230_attach_common(struct comedi_device *dev,
|
||||||
/* digital i/o subdevice */
|
/* digital i/o subdevice */
|
||||||
if (thisboard->have_dio) {
|
if (thisboard->have_dio) {
|
||||||
rc = subdev_8255_init(dev, s, NULL,
|
rc = subdev_8255_init(dev, s, NULL,
|
||||||
(devpriv->iobase1 + PCI230_PPI_X_BASE));
|
devpriv->iobase1 + PCI230_PPI_X_BASE);
|
||||||
if (rc < 0)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
} else {
|
} else {
|
||||||
s->type = COMEDI_SUBD_UNUSED;
|
s->type = COMEDI_SUBD_UNUSED;
|
||||||
|
|
Loading…
Reference in New Issue