summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorMartin Wache <M.Wache@gmx.net>2016-12-13 18:21:41 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-02-03 10:54:20 -0200
commit5332b6263742cd75963eccdea9e3af4a464c2999 (patch)
tree90b31c76e4dbccd2adedcbb727c3a8acc50ec11f /drivers/media/platform
parent5610ced4f13d5d864773ee2aa63e7cd9c3ca1c04 (diff)
downloadop-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 'drivers/media/platform')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud