summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-18 14:32:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-19 11:19:53 -0700
commit4b3fb0ff745582e2381945dc56f8f1b3e4a2c9c3 (patch)
tree7c8a93c28f570fe66d6d0ea805f1717eb04fe147
parenta0b4bccc40983535f518f87792bcb9a7eb103a79 (diff)
staging: comedi: das16m1: check for subdev_8255_init() failure
Make sure to check if subdev_8255_init() fails and propogate the error code. 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>
-rw-r--r--drivers/staging/comedi/drivers/das16m1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index 02f52eb83d38..d5f26c99ca4b 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -648,7 +648,9 @@ static int das16m1_attach(struct comedi_device *dev,
s = &dev->subdevices[3];
/* 8255 */
- subdev_8255_init(dev, s, NULL, devpriv->extra_iobase);
+ ret = subdev_8255_init(dev, s, NULL, devpriv->extra_iobase);
+ if (ret)
+ return ret;
/* disable upper half of hardware conversion counter so it doesn't mess with us */
outb(TOTAL_CLEAR, dev->iobase + DAS16M1_8254_FIRST_CNTRL);