diff options
author | 2016-12-13 18:21:41 -0200 | |
---|---|---|
committer | 2017-02-03 10:54:20 -0200 | |
commit | 5332b6263742cd75963eccdea9e3af4a464c2999 (patch) | |
tree | 90b31c76e4dbccd2adedcbb727c3a8acc50ec11f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | [media] drivers: media: i2c: ml86v7667: constify v4l2_subdev_* structures (diff) | |
download | linux-dev-5332b6263742cd75963eccdea9e3af4a464c2999.tar.xz linux-dev-5332b6263742cd75963eccdea9e3af4a464c2999.zip |
[media] dib7000p: avoid division by zero
dib7000p_read_word() may return zero on i2c errors, resulting in
dib7000p_get_internal_freq() returning zero.
So don't divide by the result of dib7000p_get_internal_freq()
without checking it for zero in dib7000p_set_dds().
On one of my machines the device
ID 2304:0229 Pinnacle Systems, Inc. PCTV Dual DVB-T 2001e
about once a day/every two days gets into a state, where
most (all?) I2C reads return with an error. Tuning during this
state will result in a divide by zero without this patch.
This patch doesn't fix the root cause for the device getting
into a bad state, but it allows me to unload/reload the drivers,
bringing it back into a usable state.
Signed-off-by: Martin Wache <M.Wache@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions