staging: comedi: propogate error code from comedi_alloc_subdevices
[deliverable/linux.git] / drivers / staging / comedi / drivers / cb_pcimdas.c
index 0ada8b91b315ebbb53fb21ea9e8d454cbc38e86e..b99a451bab9e9b73b068b14f370756fb2290c893 100644 (file)
@@ -187,6 +187,7 @@ static int cb_pcimdas_attach(struct comedi_device *dev,
        struct comedi_subdevice *s;
        struct pci_dev *pcidev = NULL;
        int index;
+       int ret;
        /* int i; */
 
 /*
@@ -269,8 +270,9 @@ found:
        /* Initialize dev->board_name */
        dev->board_name = thisboard->name;
 
-       if (comedi_alloc_subdevices(dev, 3) < 0)
-               return -ENOMEM;
+       ret = comedi_alloc_subdevices(dev, 3);
+       if (ret)
+               return ret;
 
        s = dev->subdevices + 0;
        /* dev->read_subdev=s; */
This page took 0.035468 seconds and 5 git commands to generate.