]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit92ff532cbc9df7f2bdc689213129321aa926db32
treecaf2eade0889bd0ebadfd7970255aacfd9263857
parent15aa8dee0f32e7686885e4b0d2f275cc8cb2db98
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