diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 10:00:10 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 12:17:27 (GMT) |
commit | e9dab5897066aa979db5de02d0751db9734bbf71 (patch) | |
tree | e05d56eeaea231f3f7193d549e9f1225bdc40d2a /drivers | |
parent | 771d77339b0f7a236d1fc0ef414469b4282b47a9 (diff) | |
download | linux-e9dab5897066aa979db5de02d0751db9734bbf71.tar.xz |
[media] ivtv: fix register range check
Ensure that the register is aligned to a dword, otherwise the range check
could fail since it assumes dword alignment.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 944300f..807b275 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -696,6 +696,8 @@ static int ivtv_itvc(struct ivtv *itv, bool get, u64 reg, u64 *val) { volatile u8 __iomem *reg_start; + if (reg & 0x3) + return -EINVAL; if (reg >= IVTV_REG_OFFSET && reg < IVTV_REG_OFFSET + IVTV_REG_SIZE) reg_start = itv->reg_mem - IVTV_REG_OFFSET; else if (itv->has_cx23415 && reg >= IVTV_DECODER_OFFSET && |