[media] af9033: prevent unintended underflow
authorHans-Frieder Vogt <hfvogt@gmx.net>
Wed, 3 Oct 2012 08:25:40 +0000 (05:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 5 Oct 2012 17:25:11 +0000 (14:25 -0300)
As spotted by Dan Carpenter <dan.carpenter@oracle.com> (thanks!), we have
improperly used an unsigned variable in a calculation that may result in a
negative number. This may cause an unintended underflow if the interface
frequency of the tuner is > approx. 40MHz.
This patch should resolve the issue, following an approach similar to what is
used in af9013.c.

[crope@iki.fi: add Reported-by]
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

No differences found