linux/drivers/media
Martin Wache 5332b62637 [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>
2017-02-03 10:54:20 -02:00
..
cec [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
common [media] b2c2: use IS_REACHABLE() instead of open-coding it 2017-02-03 07:12:59 -02:00
dvb-core [media] media: Protect enable_source and disable_source handler code paths 2017-02-03 07:39:35 -02:00
dvb-frontends [media] dib7000p: avoid division by zero 2017-02-03 10:54:20 -02:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c [media] drivers: media: i2c: ml86v7667: constify v4l2_subdev_* structures 2017-02-03 09:34:43 -02:00
mmc
pci [media] bt8xx: Delete unnecessary variable initialisations in ca_send_message() 2017-02-03 09:20:11 -02:00
platform [media] v4l: vsp1: Add VIDIOC_EXPBUF support 2017-02-03 09:24:13 -02:00
radio [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
rc [media] lirc: fix null dereference for tx-only devices 2017-01-31 07:32:27 -02:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners [media] mt2060: implement sleep 2017-02-03 06:55:46 -02:00
usb [media] lmedm04: make lme2510_powerup a little smaller 2017-02-03 07:39:38 -02:00
v4l2-core [media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay 2017-02-03 08:05:16 -02:00
cec-edid.c [media] cec-edid: check for IEEE identifier 2016-08-22 14:04:51 -03:00
Kconfig [media] Kconfig: fix breakages when DVB_CORE is not selected 2016-11-18 17:59:17 -02:00
Makefile [media] cec: move the CEC framework out of staging and to media 2016-11-16 15:40:20 -02:00
media-device.c [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00
media-devnode.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
media-entity.c [media] media: entity: Add debug information to graph walk 2017-01-30 11:33:26 -02:00