Skip to content
Commit c9bc9f50 authored by Prashant Laddha's avatar Prashant Laddha Committed by Mauro Carvalho Chehab
Browse files

[media] v4l2-dv-timings: fix overflow in gtf timings calculation



The intermediate calculation in the expression for hblank can exceed
32 bit signed range. This overflow can lead to negative values for
hblank. Typecasting intermediate variable to higher precision.

Cc: Martin Bugge <marbugge@cisco.com>
Signed-off-by: default avatarPrashant Laddha <prladdha@cisco.com>
[hans.verkuil@cisco.com: made the denominator u32, since that's what div_u64 expects]
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent ed1bc664
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment