staging: comedi: propogate error code from comedi_alloc_subdevices
[deliverable/linux.git] / drivers / staging / comedi / drivers / ni_660x.c
index 8c6a6ba9d4b9b2cfd92ea627c4c5fca2383f094d..5391a3949da125fce868dc6e43f3690d20042680 100644 (file)
@@ -1093,8 +1093,9 @@ static int ni_660x_attach(struct comedi_device *dev,
 
        printk(KERN_INFO " %s ", dev->board_name);
 
-       if (comedi_alloc_subdevices(dev, 2 + NI_660X_MAX_NUM_COUNTERS) < 0)
-               return -ENOMEM;
+       ret = comedi_alloc_subdevices(dev, 2 + NI_660X_MAX_NUM_COUNTERS);
+       if (ret)
+               return ret;
 
        s = dev->subdevices + 0;
        /* Old GENERAL-PURPOSE COUNTER/TIME (GPCT) subdevice, no longer used */
This page took 0.025443 seconds and 5 git commands to generate.