comedi_bond: fix off by one in doDevConfig().
authorIan Abbott <abbotti@mev.co.uk>
Mon, 4 Jan 2010 11:22:14 +0000 (11:22 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 4 Jan 2010 11:22:14 +0000 (11:22 +0000)
(Staging patch from Dan Carpenter.)

comedi/drivers/comedi_bond.c

index bd7e3d524eed271c8e6c97e423ee81a60602d69f..a18a6d343d0db553e23142aba4dcbc7773e1a1e2 100644 (file)
@@ -402,7 +402,7 @@ static int doDevConfig(comedi_device * dev, comedi_devconfig * it)
                int sdev = -1, nchans, tmp;
                BondedDevice *bdev = 0;
 
-               if (minor < 0 || minor > COMEDI_NUM_BOARD_MINORS) {
+               if (minor < 0 || minor >= COMEDI_NUM_BOARD_MINORS) {
                        ERROR("Minor %d is invalid!\n", minor);
                        return 0;
                }