linux-stable/drivers/media
Hans Verkuil 6bda7073f3 media: v4l2-subdev: fix regression in check_pad()
sd->entity.graph_obj.mdev can be NULL when this function is called, and
that breaks existing drivers (rcar-vin, but probably others as well).

Check if sd->entity.num_pads is non-zero instead since that doesn't depend
on mdev.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Fixes: a8fa55078a ("media: v4l2-subdev: Verify arguments in v4l2_subdev_call()")
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-11 08:59:54 -04:00
..
cec media: cec-notifier: add new notifier functions 2019-06-27 07:19:43 -04:00
common media: media/pci: set device_caps in struct video_device 2019-06-24 14:57:12 -04:00
dvb-core media: dvb_frontend: split dvb_frontend_handle_ioctl function 2019-06-27 07:24:12 -04:00
dvb-frontends media: stv0297: fix frequency range limit 2019-06-27 07:33:09 -04:00
firewire treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
i2c media: st-mipid02: add support of JPEG 2019-06-24 13:04:58 -04:00
mc Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
mmc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci media: pci: cx88: Change the type of 'missed' to u64 2019-06-24 14:59:04 -04:00
platform media: cec: add struct cec_connector_info support 2019-06-27 07:18:43 -04:00
radio media: radio-raremono: change devm_k*alloc to k*alloc 2019-06-27 07:35:24 -04:00
rc media: rc: Prefer KEY_NUMERIC_* for number buttons on remotes 2019-06-27 07:30:28 -04:00
spi Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
tuners media: si2157: add detection of si2177 tuner 2019-06-13 14:26:59 -04:00
usb media: hdpvr: fix locking and a missing msleep 2019-06-24 15:02:01 -04:00
v4l2-core media: v4l2-subdev: fix regression in check_pad() 2019-07-11 08:59:54 -04:00
Kconfig media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00