summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorGüngör Erseymen2013-06-07 20:29:50 +0200
committerGreg Kroah-Hartman2013-06-09 07:14:27 +0200
commit7b1a5e2f4f5afde4f1dadf58223c2f293208293b (patch)
treedb3d6c2d85702dae0c3c4aa8e8c4f311767900f1 /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: remove 'bc.subdevice < 0' check in do_bufconfig_ioctl() (diff)
downloadkernel-qcow2-linux-7b1a5e2f4f5afde4f1dadf58223c2f293208293b.tar.gz
kernel-qcow2-linux-7b1a5e2f4f5afde4f1dadf58223c2f293208293b.tar.xz
kernel-qcow2-linux-7b1a5e2f4f5afde4f1dadf58223c2f293208293b.zip
staging: comedi: remove 'bi.subdevice < 0' check in do_bufinfo_ioctl()
Type of variable 'bi' is struct comedi_bufinfo 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@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
-rw-r--r--drivers/staging/comedi/comedi_fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 986f19572689..c561a0eda92a 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -913,7 +913,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
if (copy_from_user(&bi, arg, sizeof(bi)))
return -EFAULT;
- if (bi.subdevice >= dev->n_subdevices || bi.subdevice < 0)
+ if (bi.subdevice >= dev->n_subdevices)
return -EINVAL;
s = &dev->subdevices[bi.subdevice];