Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca4186f0 authored by Ohad Ben-Cohen's avatar Ohad Ben-Cohen Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarOhad Ben-Cohen <ohad@wizery.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 66072d4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;