aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <[email protected]>2017-11-01 17:06:03 -0400
committerMauro Carvalho Chehab <[email protected]>2017-12-11 13:04:54 -0500
commitf303810cf189144a613a7efa991816655e6467ea (patch)
tree52e5f65350e6dbfa322979b7b8e6f0ef6e390136 /tools/perf/scripts/python/bin
parent15e3145a709978db777bd60d07552da06ae0e407 (diff)
media: mb86a16: avoid division by zero
As warned by smatch: drivers/media/dvb-frontends/mb86a16.c:1690 mb86a16_read_ber() error: uninitialized symbol 'timer'. drivers/media/dvb-frontends/mb86a16.c:1706 mb86a16_read_ber() error: uninitialized symbol 'timer'. There is a potential risk of doing a division by zero if timer is not handled well. Enforce it by setting a bit mask for the values used to select the timer. It should be noticed that I don't have mb86a16 datasheet. So, the bitmask was guessed based on the existing checks for the field. At worse case scenario, it will just show a badly calculated bit error rate, but it won't crash. While here, optimize the logic to prevent uneeded tests. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions