Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
e9dab589 771d7733

+2
+2
drivers/media/pci/ivtv/ivtv-ioctl.c
··· 696 696 { 697 697 volatile u8 __iomem *reg_start; 698 698 699 + if (reg & 0x3) 700 + return -EINVAL; 699 701 if (reg >= IVTV_REG_OFFSET && reg < IVTV_REG_OFFSET + IVTV_REG_SIZE) 700 702 reg_start = itv->reg_mem - IVTV_REG_OFFSET; 701 703 else if (itv->has_cx23415 && reg >= IVTV_DECODER_OFFSET &&