staging: comedi: propogate error code from comedi_alloc_subdevices
[deliverable/linux.git] / drivers / staging / comedi / drivers / rtd520.c
index 445333b2413eb96b6c50758f7d60281cfdac0331..c3c8097acd0262a534c4599d51eb92a685dd9558 100644 (file)
@@ -1999,9 +1999,9 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        /* Show board configuration */
        printk(KERN_INFO "%s:", dev->board_name);
 
-       if (comedi_alloc_subdevices(dev, 4) < 0)
-               return -ENOMEM;
-
+       ret = comedi_alloc_subdevices(dev, 4);
+       if (ret)
+               return ret;
 
        s = dev->subdevices + 0;
        dev->read_subdev = s;
This page took 0.026853 seconds and 5 git commands to generate.