diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2018-06-23 18:35:58 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-30 23:23:12 +0300 |
commit | f9dc3af8212b626a62103e7ba8cb3c84482334b8 (patch) | |
tree | c7be29b63ead931a2a50e0fc30d1ec5463c5c676 /drivers | |
parent | d21c249b26311dd193b100e65fc9e7ae96233d40 (diff) | |
download | linux-f9dc3af8212b626a62103e7ba8cb3c84482334b8.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb-frontends/stv0910.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index 41444fa1c0bb..91b21eb59531 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -682,8 +682,8 @@ static int get_bit_error_rate_s(struct stv *state, u32 *bernumerator, return -EINVAL; if ((regs[0] & 0x80) == 0) { - state->last_berdenominator = 1 << ((state->berscale * 2) + - 10 + 3); + state->last_berdenominator = 1ULL << ((state->berscale * 2) + + 10 + 3); state->last_bernumerator = ((u32)(regs[0] & 0x7F) << 16) | ((u32)regs[1] << 8) | regs[2]; if (state->last_bernumerator < 256 && state->berscale < 6) { |