linux-uconsole/drivers/media/platform/vimc
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
..
Kconfig
Makefile media: vimc: Add vimc-streamer for stream control 2019-03-23 20:10:12 +01:00
vimc-capture.c media: vimc: cap: check v4l2_fill_pixfmt return value 2019-07-26 09:14:11 +02:00
vimc-common.c media: vimc: fix start stream when link is disabled 2019-12-13 08:52:34 +01:00
vimc-common.h media: vimc: Add vimc-streamer for stream control 2019-03-23 20:10:12 +01:00
vimc-core.c media: vimc: fix component match compare 2019-12-17 20:35:38 +01:00
vimc-debayer.c media: vimc: Add vimc-streamer for stream control 2019-03-23 20:10:12 +01:00
vimc-scaler.c media: vimc: Add vimc-streamer for stream control 2019-03-23 20:10:12 +01:00
vimc-sensor.c media: vimc: Remove unused but set variables 2019-11-06 13:05:37 +01:00
vimc-streamer.c media: vimc: stream: fix thread state before sleep 2019-05-31 06:46:33 -07:00
vimc-streamer.h media: vimc: Add vimc-streamer for stream control 2019-03-23 20:10:12 +01:00