summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorGüngör Erseymen2013-06-07 20:29:49 +0200
committerGreg Kroah-Hartman2013-06-09 07:14:27 +0200
commit11f80ddfd51f802575dc8b00ca59156d8e6a3e6e (patch)
treef3452a3790ab1413a9f115ddbc7d6e7f7664bb7f /drivers/staging/comedi/comedi_fops.c
parentstaging: imx-drm: Add MODULE_DEVICE_TABLE to parallel display (diff)
downloadkernel-qcow2-linux-11f80ddfd51f802575dc8b00ca59156d8e6a3e6e.tar.gz
kernel-qcow2-linux-11f80ddfd51f802575dc8b00ca59156d8e6a3e6e.tar.xz
kernel-qcow2-linux-11f80ddfd51f802575dc8b00ca59156d8e6a3e6e.zip
staging: comedi: remove 'bc.subdevice < 0' check in do_bufconfig_ioctl()
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@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 610be19d859f..986f19572689 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];