]> git.baikalelectronics.ru Git - kernel.git/commit
[media] usb/cpia2_core: clean up a min_t() cast
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 9 Feb 2016 11:14:12 +0000 (09:14 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 19 Feb 2016 10:10:32 +0000 (08:10 -0200)
commit157f55b47ba3d01bf0eec4f24ee873379993dfdf
tree6046536e7537660cd4f0627e8a5b10968af969cc
parent842ba82718ecb17b9547234732c9711acbdb152d
[media] usb/cpia2_core: clean up a min_t() cast

It makes sense to make the min_t() cast unsigned here since we don't
really want negative sizes.  Making it signed causes a static checker
warning in Smatch.  Smatch knows "fw->size - i" is positive but it
doesn't know that fw->size is less than INT_MAX so in theory casting it
to int might lead to a negative.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/cpia2/cpia2_core.c