]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[media] m88ts2022: fix 32bit overflow on filter calc
authorAntti Palosaari <crope@iki.fi>
Thu, 21 Aug 2014 17:02:27 +0000 (14:02 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 2 Sep 2014 18:48:00 +0000 (15:48 -0300)
commitf538e085138e519e25ae0828bd6c6e7492ce8ca4
tree2d2262193d33ca153eb7128bdcf10f59fe975968
parentde3f2e2e0ac94c1369722a33e7d7b2ca121ba083
[media] m88ts2022: fix 32bit overflow on filter calc

Maximum satellite symbol rate used is 45000000Sps which overflows
when multiplied by 135. As final calculation result is fraction,
we could use mult_frac macro in order to keep calculation inside
32 bit number limits and prevent overflow.

Original bug and fix was provided by Nibble Max. I decided to
implement it differently as it is now.

Reported-by: Nibble Max <nibble.max@gmail.com>
Tested-by: Nibble Max <nibble.max@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/tuners/m88ts2022.c