Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b3fb0ff authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0b4bccc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);