linux-uconsole/drivers/media
Helen Koike 27944403bb media: vimc: fix component match compare
[ Upstream commit ee1c71a8e1 ]

If the system has other devices being registered in the component
framework, the compare function will be called with a device that
doesn't belong to vimc.
This device is not necessarily a platform_device, nor have a
platform_data (which causes a NULL pointer dereference error) and if it
does have a pdata, it is not necessarily type of struct vimc_platform_data.
So casting to any of these types is wrong.

Instead of expecting a given pdev with a given pdata, just expect for
the device it self. vimc-core is the one who creates them, we know in
advance exactly which object to expect in the match.

Fixes: 4a29b70907 ("[media] vimc: Subdevices as modules")

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-17 20:35:38 +01:00
..
cec media: cec: report Vendor ID after initialization 2019-12-13 08:51:38 +01:00
common media: videobuf2-dma-sg: Prevent size from overflowing 2019-07-26 09:14:24 +02:00
dvb-core media: don't drop front-end reference count for ->detach 2019-10-05 13:10:05 +02:00
dvb-frontends media: dvb-frontends: use ida for pll number 2019-10-05 13:09:46 +02:00
firewire media: firewire: Fix app_info parameter type in avc_ca{,_app}_info 2019-01-26 09:32:37 +01:00
i2c media: ov13858: Check for possible null pointer 2019-12-01 09:17:18 +01:00
mmc
pci media: cx18: Don't check for address of video_dev 2019-11-24 08:20:40 +01:00
platform media: vimc: fix component match compare 2019-12-17 20:35:38 +01:00
radio media: radio: wl1273: fix interrupt masking on release 2019-12-17 20:34:59 +01:00
rc media: imon: invalid dereference in imon_touch_event 2019-12-01 09:17:40 +01:00
spi media: cxd2880-spi: fix probe when dvb_attach fails 2019-12-13 08:52:23 +01:00
tuners Merge branch 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-08-21 17:40:46 -07:00
usb media: stkwebcam: Bugfix for wrong return values 2019-12-13 08:52:28 +01:00
v4l2-core media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE 2019-12-05 09:21:28 +01:00
Kconfig
Makefile
media-device.c media: mc-device.c: don't memset __user pointer contents 2019-07-26 09:14:02 +02:00
media-devnode.c
media-entity.c