diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 07:00:02 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 08:54:44 -0300 |
commit | 4e032f3f58800a998bae79150909410d7a37206f (patch) | |
tree | 89f74545ade5eded447a10e3cbe85347fd49a966 /drivers/media/platform/marvell-ccic/mmp-driver.c | |
parent | 9dd1d6f01750955ae5183f0da73606b314cc1a42 (diff) | |
download | blackbird-op-linux-4e032f3f58800a998bae79150909410d7a37206f.tar.gz blackbird-op-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.c | 1 |
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? |