summaryrefslogtreecommitdiff
path: root/drivers/media/media-device.c
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2016-03-16 15:14:13 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-04-14 01:17:39 +0300
commitecb7b0183a89613c154d1bea48b494907efbf8f9 (patch)
tree3719495a0e9babac97e4f360a7571cc6a3fc4a2b /drivers/media/media-device.c
parent71c5daba0546c456c5589bcf52eb2641abf42a85 (diff)
downloadlinux-ecb7b0183a89613c154d1bea48b494907efbf8f9.tar.xz
[media] m88ds3103: fix undefined division
s32tmp in the below code may be negative, and dev->mclk_khz is an unsigned type. s32tmp = 0x10000 * (tuner_frequency - c->frequency); s32tmp = DIV_ROUND_CLOSEST(s32tmp, dev->mclk_khz); This is undefined, as DIV_ROUND_CLOSEST is undefined for negative dividends when the divisor is of unsigned type. So, change mclk_khz to be signed (s32). Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/media-device.c')
0 files changed, 0 insertions, 0 deletions