summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/marvell-ccic/mmp-driver.c
diff options
context:
space:
mode:
authorHans Verkuil2013-05-29 12:00:02 +0200
committerMauro Carvalho Chehab2013-06-17 13:54:44 +0200
commit4e032f3f58800a998bae79150909410d7a37206f (patch)
tree89f74545ade5eded447a10e3cbe85347fd49a966 /drivers/media/platform/marvell-ccic/mmp-driver.c
parent[media] vpbe_display: drop g/s_register ioctls (diff)
downloadkernel-qcow2-linux-4e032f3f58800a998bae79150909410d7a37206f.tar.gz
kernel-qcow2-linux-4e032f3f58800a998bae79150909410d7a37206f.tar.xz
kernel-qcow2-linux-4e032f3f58800a998bae79150909410d7a37206f.zip
[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 cadad647ce0e..a634888271cd 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?