staging: comedi: propogate error code from comedi_alloc_subdevices
[deliverable/linux.git] / drivers / staging / comedi / drivers / pcmmio.c
index 31053034b0736533fb8312937f8a4032663ca18a..0e64d848a2a887956532f9cfc7ed1488a58dd615 100644 (file)
@@ -1020,6 +1020,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
            thisasic_chanct = 0;
        unsigned long iobase;
        unsigned int irq[MAX_ASICS];
+       int ret;
 
        iobase = it->options[0];
        irq[0] = it->options[1];
@@ -1072,8 +1073,9 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                return -ENOMEM;
        }
 
-       if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
-               return -ENOMEM;
+       ret = comedi_alloc_subdevices(dev, n_subdevs);
+       if (ret)
+               return ret;
 
        /* First, AI */
        sdev_no = 0;
This page took 0.025014 seconds and 5 git commands to generate.