diff options
author | 2012-06-12 11:59:33 -0700 | |
---|---|---|
committer | 2012-06-12 14:44:04 -0700 | |
commit | 8b6c56949ffa83dbc2a6e8fa3f98b10a19372207 (patch) | |
tree | 71fb0a053eca4f23efdca55f479554ba037ee987 /drivers/staging/comedi/drivers/ni_atmio16d.c | |
parent | staging: comedi: remove the "Allocate the subdevice..." comments (diff) | |
download | linux-dev-8b6c56949ffa83dbc2a6e8fa3f98b10a19372207.tar.xz linux-dev-8b6c56949ffa83dbc2a6e8fa3f98b10a19372207.zip |
staging: comedi: propogate error code from comedi_alloc_subdevices
comedi_alloc_subdevices can fail with -EINVAL or -ENOMEM. When it
does fail make sure to pass the proper error code back.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_atmio16d.c')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_atmio16d.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c index 37ff6fc86157..95bee84b78ae 100644 --- a/drivers/staging/comedi/drivers/ni_atmio16d.c +++ b/drivers/staging/comedi/drivers/ni_atmio16d.c @@ -710,7 +710,7 @@ static int atmio16d_attach(struct comedi_device *dev, dev->board_name = board->name; ret = comedi_alloc_subdevices(dev, 4); - if (ret < 0) + if (ret) return ret; ret = alloc_private(dev, sizeof(struct atmio16d_private)); |