mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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>
This commit is contained in:
parent
fa45f2c720
commit
11f80ddfd5
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue