[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)
commit76880b4015f7bdbe73bf2c07e42ef0ba7a343d3e
tree6046536e7537660cd4f0627e8a5b10968af969cc
parentbb07df8ae18b42a8c5aea715fae82938b467ff9d
[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