diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2011-06-01 12:39:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-30 22:01:05 -0400 |
commit | ca4186f06fecbf2b692a42cdea54b7ef23b2496c (patch) | |
tree | 80f5438034d6612ac4b18f35a14ed9c66d254663 /drivers/media/video/omap3isp | |
parent | 66072d4fa7cb644f1f064e290f8fddfbd8ccd478 (diff) |
[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>
Diffstat (limited to 'drivers/media/video/omap3isp')
-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) | |||
1748 | goto done; | 1748 | goto done; |
1749 | 1749 | ||
1750 | /* Register external entities */ | 1750 | /* Register external entities */ |
1751 | for (subdevs = pdata->subdevs; subdevs->subdevs; ++subdevs) { | 1751 | for (subdevs = pdata->subdevs; subdevs && subdevs->subdevs; ++subdevs) { |
1752 | struct v4l2_subdev *sensor; | 1752 | struct v4l2_subdev *sensor; |
1753 | struct media_entity *input; | 1753 | struct media_entity *input; |
1754 | unsigned int flags; | 1754 | unsigned int flags; |