diff options
author | Martin Wache <M.Wache@gmx.net> | 2016-12-13 18:21:41 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-02-03 10:54:20 -0200 |
commit | 5332b6263742cd75963eccdea9e3af4a464c2999 (patch) | |
tree | 90b31c76e4dbccd2adedcbb727c3a8acc50ec11f /.mailmap | |
parent | 5610ced4f13d5d864773ee2aa63e7cd9c3ca1c04 (diff) | |
download | op-kernel-dev-5332b6263742cd75963eccdea9e3af4a464c2999.zip op-kernel-dev-5332b6263742cd75963eccdea9e3af4a464c2999.tar.gz |
[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 '.mailmap')
0 files changed, 0 insertions, 0 deletions