driver: char: rpivid: Don't map more than wanted
authorPhil Elwell <phil@raspberrypi.com>
Tue, 21 Apr 2020 10:30:23 +0000 (11:30 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:49 +0000 (16:33 +0100)
commitc647cfc27686d00403b3affa0072df1d20b9a0d7
tree65d467b695fe55051826f647a929af5f563147c9
parent8f903614a0652ca6736bce38d0818e9fad4fbf0b
driver: char: rpivid: Don't map more than wanted

Limit mappings to the permitted range, but don't map more than asked
for otherwise we walk off the end of the allocated VMA.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/char/broadcom/rpivid-mem.c