summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/pcl812.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-06-12 11:59:33 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-12 14:44:04 -0700
commit8b6c56949ffa83dbc2a6e8fa3f98b10a19372207 (patch)
tree71fb0a053eca4f23efdca55f479554ba037ee987 /drivers/staging/comedi/drivers/pcl812.c
parenteea6838b1206b0ac90110f1a6f58e101aa496e99 (diff)
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/pcl812.c')
-rw-r--r--drivers/staging/comedi/drivers/pcl812.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index 128f5b644878..0a4074af8a60 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -1383,7 +1383,7 @@ no_dma:
n_subdevices++;
ret = comedi_alloc_subdevices(dev, n_subdevices);
- if (ret < 0) {
+ if (ret) {
free_resources(dev);
return ret;
}