aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-02-03 10:43:26 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 10:49:19 -0800
commit46828a56f24a9121a4a3de33e1985fc4532c017c (patch)
tree3391a1dd6fadc56d8d5b9b850a86fabe5079525f
parente6439a458aa2805f05dd5fb3da8a95fd90082728 (diff)
staging: comedi: amplc_pc236: remove dev_err() message due to allocation failure
The subdev_8255_init() call can only fail due to the allocation of the private data. This failure will alreay have produced an error message. Remove the redundant dev_err(). 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>
-rw-r--r--drivers/staging/comedi/drivers/amplc_pc236.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
index 31734e1142f..12eabd6b497 100644
--- a/drivers/staging/comedi/drivers/amplc_pc236.c
+++ b/drivers/staging/comedi/drivers/amplc_pc236.c
@@ -411,10 +411,9 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase,
s = &dev->subdevices[0];
/* digital i/o subdevice (8255) */
ret = subdev_8255_init(dev, s, NULL, iobase);
- if (ret < 0) {
- dev_err(dev->class_dev, "error! out of memory!\n");
+ if (ret)
return ret;
- }
+
s = &dev->subdevices[1];
dev->read_subdev = s;
s->type = COMEDI_SUBD_UNUSED;