Skip to content

Commit

Permalink
staging: comedi: das16m1: check for subdev_8255_init() failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 19, 2013
1 parent a0b4bcc commit 4b3fb0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/comedi/drivers/das16m1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4b3fb0f

Please sign in to comment.