Skip to content

Commit

Permalink
[media] media: omap3isp: fix a potential NULL deref
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ohad Ben-Cohen authored and Mauro Carvalho Chehab committed Jul 1, 2011
1 parent 66072d4 commit ca4186f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/omap3isp/isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ca4186f

Please sign in to comment.