media: staging: rkisp1: isp: do not set invalid mbus code for pad
authorHelen Koike <helen.koike@collabora.com>
Thu, 6 Feb 2020 22:07:12 +0000 (23:07 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 24 Feb 2020 16:41:12 +0000 (17:41 +0100)
commit100f720aabab3d5f58f67c508186041b3c797a9b
tree5b04631a10045969ab1f5692e4efa8aed5980aa3
parent20e46fc1029f195b40f1f437e5de47f553005373
media: staging: rkisp1: isp: do not set invalid mbus code for pad

When setting source pad, check if the given mbus code is indeed valid
for source pad, if not, then set the default code.
Same for sink pad.

Fixes: d65dd85281fb ("media: staging: rkisp1: add Rockchip ISP1 base driver")
Reported-by: Wojciech Zabolotny <wzab01@gmail.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkisp1/rkisp1-isp.c