staging: comedi: propogate error code from comedi_alloc_subdevices
[deliverable/linux.git] / drivers / staging / comedi / drivers / cb_pcidas.c
index e1bd99a950e43f253d950eca5b3c6e03edf91cf8..2ca3fa0fc776e37b3ee5ea9c493a3d3690d61de2 100644 (file)
@@ -533,6 +533,7 @@ static int cb_pcidas_attach(struct comedi_device *dev,
        struct pci_dev *pcidev = NULL;
        int index;
        int i;
+       int ret;
 
 /*
  * Allocate the private structure area.
@@ -614,8 +615,9 @@ found:
        /* Initialize dev->board_name */
        dev->board_name = thisboard->name;
 
-       if (comedi_alloc_subdevices(dev, 7) < 0)
-               return -ENOMEM;
+       ret = comedi_alloc_subdevices(dev, 7);
+       if (ret)
+               return ret;
 
        s = dev->subdevices + 0;
        /* analog input subdevice */
This page took 0.027804 seconds and 5 git commands to generate.