Type of variable 'bc' is struct comedi_bufconfig and 'subdevice' is defined as unsigned, so there is no need to check if it is less then zero. Signed-off-by: Güngör Erseymen <gelurine@xxxxxxxxx> --- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 610be19..986f195 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -660,7 +660,7 @@ static int do_bufconfig_ioctl(struct comedi_device *dev, if (copy_from_user(&bc, arg, sizeof(bc))) return -EFAULT; - if (bc.subdevice >= dev->n_subdevices || bc.subdevice < 0) + if (bc.subdevice >= dev->n_subdevices) return -EINVAL; s = &dev->subdevices[bc.subdevice]; -- 1.8.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel