mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 17:43:59 +00:00
[media] media: omap3isp: fix a potential NULL deref
Fix a potential NULL pointer dereference by skipping registration of external entities in case none are provided. This is useful at least when testing mere memory-to-memory scenarios. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
66072d4fa7
commit
ca4186f06f
@ -1748,7 +1748,7 @@ static int isp_register_entities(struct isp_device *isp)
|
||||
goto done;
|
||||
|
||||
/* Register external entities */
|
||||
for (subdevs = pdata->subdevs; subdevs->subdevs; ++subdevs) {
|
||||
for (subdevs = pdata->subdevs; subdevs && subdevs->subdevs; ++subdevs) {
|
||||
struct v4l2_subdev *sensor;
|
||||
struct media_entity *input;
|
||||
unsigned int flags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user