media: exynos4-is: Fix nullptr when no CSIS device present
authorJonathan Bakker <xc-racer2@live.ca>
Thu, 30 Jul 2020 23:01:06 +0000 (01:01 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 1 Sep 2020 12:13:25 +0000 (14:13 +0200)
commita1f51d37324260f16561429d77abdc1502135cfd
treecaf2eade0889bd0ebadfd7970255aacfd9263857
parent55400d7745ca88d3770e37b695785e18ebe23703
media: exynos4-is: Fix nullptr when no CSIS device present

Not all devices use the CSIS device, some may use the FIMC directly in
which case the CSIS device isn't registered.  This leads to a nullptr
exception when starting the stream as the CSIS device is always
referenced.  Instead, if getting the CSIS device fails, try getting the
FIMC directly to check if we are using the subdev API

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/exynos4-is/media-dev.c