]> git.baikalelectronics.ru Git - kernel.git/commit
media: stm32-dcmi: fix crash when subdev do not expose any formats
authorHugues Fruchet <hugues.fruchet@st.com>
Mon, 1 Apr 2019 08:56:09 +0000 (04:56 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Apr 2019 15:09:23 +0000 (11:09 -0400)
commit81fccda3f5f8185de66b6dcce2ed6361cb26ff1a
tree1a90a32c2f7523fdca38f2b817d56eba18300413
parentbcfeb9fdbe2e7c76d70e8b0ffb6aa8b3a0cafffc
media: stm32-dcmi: fix crash when subdev do not expose any formats

Do not access sd_formats[] if num_of_sd_formats is zero, ie
subdev sensor didn't expose any formats.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/stm32/stm32-dcmi.c