staging: comedi: das16m1: check for subdev_8255_init() failure
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 18 Apr 2013 21:32:48 +0000 (14:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Apr 2013 18:19:53 +0000 (11:19 -0700)
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>
drivers/staging/comedi/drivers/das16m1.c

index 02f52eb83d38065d2c2b1ddbf654547f6f2bb89d..d5f26c99ca4bd07fd67071badaa5c2d2e8a625ae 100644 (file)
@@ -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);