linux_dsm_epyc7002/drivers/media
Helen Koike ee1c71a8e1 media: vimc: fix component match compare
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>
2019-05-28 13:10:49 -04:00
..
cec Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
common Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
dvb-core Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
dvb-frontends Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
firewire treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
i2c Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
mc media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00
mmc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pci Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
platform media: vimc: fix component match compare 2019-05-28 13:10:49 -04:00
radio Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
rc Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
spi Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
tuners Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
usb media: pwc: convert to BIT macro 2019-05-28 12:38:08 -04:00
v4l2-core media: v4l2-core: fix use-after-free error 2019-05-28 12:50:33 -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