mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
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>
This commit is contained in:
parent
11f80ddfd5
commit
7b1a5e2f4f
1 changed files with 1 additions and 1 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue