media: gspca: fix frame overflow error
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 20 Nov 2018 10:13:04 +0000 (05:13 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 22 Nov 2018 18:44:38 +0000 (13:44 -0500)
commitf96d84488f7d5f9123428c700cea82a292bca53e
tree4e46a602df97f48c812de933b8a45104d06fa122
parentcb3b2ffb757e75fef40fb94bc093cbbf49a6bf6e
media: gspca: fix frame overflow error

When converting gspca to vb2 I missed that fact that the buffer sizes
were rounded up to the next page size. As a result some gspca drivers
(spca561 being one of them) reported frame overflows.

Modify the code to align the buffer sizes to the next page size, just
as the original code did.

Fixes: 1f5965c4dfd7 ("media: gspca: convert to vb2")
Tested-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: softwarebugs <softwarebugs@protonmail.com>
Cc: <stable@vger.kernel.org> # for v4.18 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/gspca/gspca.c