summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/marvell-ccic/mmp-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-05-29 07:00:02 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-17 08:54:44 -0300
commit4e032f3f58800a998bae79150909410d7a37206f (patch)
tree89f74545ade5eded447a10e3cbe85347fd49a966 /drivers/media/platform/marvell-ccic/mmp-driver.c
parent9dd1d6f01750955ae5183f0da73606b314cc1a42 (diff)
downloadop-kernel-dev-4e032f3f58800a998bae79150909410d7a37206f.zip
op-kernel-dev-4e032f3f58800a998bae79150909410d7a37206f.tar.gz
[media] marvell-ccic: check register address
Prevent out-of-range register accesses. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/marvell-ccic/mmp-driver.c')
-rw-r--r--drivers/media/platform/marvell-ccic/mmp-driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
index cadad64..a634888 100644
--- a/drivers/media/platform/marvell-ccic/mmp-driver.c
+++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
@@ -202,6 +202,7 @@ static int mmpcam_probe(struct platform_device *pdev)
ret = -ENODEV;
goto out_free;
}
+ mcam->regs_size = resource_size(res);
/*
* Power/clock memory is elsewhere; get it too. Perhaps this
* should really be managed outside of this driver?
OpenPOWER on IntegriCloud