linux/drivers/media
Saso Slavicic cd82982179 [media] ascot2e: Fix I2C message size check
Tuning a card with Sony ASCOT2E produces the following error:

	kernel: i2c i2c-9: wr reg=0006: len=11 is too big!

MAX_WRITE_REGSIZE is defined as 10, buf[MAX_WRITE_REGSIZE + 1] buffer is
used in ascot2e_write_regs().

The problem is that exactly 10 bytes are written in ascot2e_set_params():

	/* Set BW_OFFSET (0x0F) value from parameter table */
	data[9] = ascot2e_sett[tv_system].bw_offset;
	ascot2e_write_regs(priv, 0x06, data, 10);

The test in write_regs is as follows:

	if (len + 1 >= sizeof(buf))

10 + 1 = 11 and that would be exactly the size of buf. Since 10 bytes +
buf[0] = reg would seem to fit into buf[], this shouldn't be an error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13 11:56:22 -03:00
..
common [media] v4l2-tpg: ignore V4L2_DV_RGB_RANGE setting for YUV formats 2016-07-08 16:16:52 -03:00
dvb-core [media] media: dvb_ringbuffer: Add memory barriers 2016-07-09 07:57:47 -03:00
dvb-frontends [media] ascot2e: Fix I2C message size check 2016-07-13 11:56:22 -03:00
firewire [media] dvb: modify core to implement interfaces/entities at MC new gen 2016-01-11 12:18:52 -02:00
i2c [media] adv7511: the h/vsync polarities were always positive 2016-07-12 13:37:41 -03:00
mmc [media] siano: register media controller earlier 2015-02-26 09:10:39 -03:00
pci [media] cx23885: Add support for Hauppauge WinTV quadHD DVB version 2016-07-12 13:39:37 -03:00
platform [media] mtk-vcodec: remove redundant dev_err call in mtk_vcodec_probe() 2016-07-13 08:01:20 -03:00
radio [media] radio-maxiradio: fix memory leak when device is removed 2016-06-28 08:05:47 -03:00
rc [media] Convert Wideview WT220 DVB USB driver to rc-core 2016-07-09 12:10:33 -03:00
tuners [media] it913x: do not allow driver unbind 2016-07-08 17:01:23 -03:00
usb [media] Remove spurious blank lines in dw2101 kernel messages 2016-07-13 07:44:01 -03:00
v4l2-core [media] v4l2-ioctl: zero the v4l2_bt_timings reserved field 2016-07-12 13:37:20 -03:00
cec-edid.c [media] cec-edid: add module for EDID CEC helper functions 2016-06-28 09:45:51 -03:00
Kconfig [media] cec: fix Kconfig dependency problems 2016-07-08 18:34:00 -03:00
Makefile [media] cec: fix Kconfig dependency problems 2016-07-08 18:34:00 -03:00
media-device.c [media] media: fix media devnode ioctl/syscall and unregister race 2016-06-15 17:59:28 -03:00
media-devnode.c [media] media: fix media devnode ioctl/syscall and unregister race 2016-06-15 17:59:28 -03:00
media-entity.c [media] media: change pipeline validation return error 2016-04-29 08:07:17 -03:00