Commit 4f0036ef authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: cb_pcidas: check for failure of subdev_8255_init

It's possible for subdev_8255_init() to fail due to its kzalloc().
Make sure to check for this failure and pass on the error code.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a5aed48
......@@ -1640,7 +1640,10 @@ static int cb_pcidas_attach(struct comedi_device *dev,
/* 8255 */
s = dev->subdevices + 2;
subdev_8255_init(dev, s, NULL, devpriv->pacer_counter_dio + DIO_8255);
ret = subdev_8255_init(dev, s, NULL,
devpriv->pacer_counter_dio + DIO_8255);
if (ret)
return ret;
/* serial EEPROM, */
s = dev->subdevices + 3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment