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: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/* 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;