mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
media: dvb-frontends/stv0910: cast the BER denominator shift exp to ULL
To avoid miscalculations related to the BER denominator, the shift expression needs to be casted as ULL. Picked up from the upstream dddvb GIT. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
d21c249b26
commit
f9dc3af821
1 changed files with 2 additions and 2 deletions
|
@ -682,8 +682,8 @@ static int get_bit_error_rate_s(struct stv *state, u32 *bernumerator,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if ((regs[0] & 0x80) == 0) {
|
if ((regs[0] & 0x80) == 0) {
|
||||||
state->last_berdenominator = 1 << ((state->berscale * 2) +
|
state->last_berdenominator = 1ULL << ((state->berscale * 2) +
|
||||||
10 + 3);
|
10 + 3);
|
||||||
state->last_bernumerator = ((u32)(regs[0] & 0x7F) << 16) |
|
state->last_bernumerator = ((u32)(regs[0] & 0x7F) << 16) |
|
||||||
((u32)regs[1] << 8) | regs[2];
|
((u32)regs[1] << 8) | regs[2];
|
||||||
if (state->last_bernumerator < 256 && state->berscale < 6) {
|
if (state->last_bernumerator < 256 && state->berscale < 6) {
|
||||||
|
|
Loading…
Reference in a new issue