diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2011-06-01 18:39:46 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-01 04:01:05 +0200 |
commit | ca4186f06fecbf2b692a42cdea54b7ef23b2496c (patch) | |
tree | 80f5438034d6612ac4b18f35a14ed9c66d254663 | |
parent | [media] media: vb2: fix allocation failure check (diff) | |
download | linux-ca4186f06fecbf2b692a42cdea54b7ef23b2496c.tar.xz linux-ca4186f06fecbf2b692a42cdea54b7ef23b2496c.zip |
[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>
-rw-r--r-- | drivers/media/video/omap3isp/isp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c index c9fd04ee70a8..94b6ed89e195 100644 --- a/drivers/media/video/omap3isp/isp.c +++ b/drivers/media/video/omap3isp/isp.c @@ -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; |