[media] gspca: Fix underflow in vidioc_s_parm()
authorHans de Goede <hdegoede@redhat.com>
Thu, 15 Jan 2015 10:42:36 +0000 (07:42 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 29 Jan 2015 20:28:16 +0000 (18:28 -0200)
commitc7e5a726d5fbf453c49fc8326a6580402643c900
tree20f0ea70ac094d4ba6f29b725bb7a4c47d0337f0
parent0f5b26576246251622e33c076486b7cb0bdb0d99
[media] gspca: Fix underflow in vidioc_s_parm()

"n" is a user controlled integer.  The code here doesn't handle the case
where "n" is negative and this causes a static checker warning.

drivers/media/usb/gspca/gspca.c:1571 vidioc_s_parm()
warn: no lower bound on 'n'

parm.capture.readbuffers is unsigned, so make n unsigned too, fixing this.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/gspca/gspca.c