]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:45:02 +0000 (06:45 -0700)
commit6e4a22993b09c16e7194ce528efc49e2be3152f1
tree9a9991fbbcb2ee467772391a16e1d1e853a0cf88
parent3a7a701d18b0e21996b8115e1e581ff9d95ac2bc
media: stm32-dcmi: fix crash when subdev do not expose any formats

[ Upstream commit 33dfeb62e23c31619d2197850f7e8b50e8cc5466 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/stm32/stm32-dcmi.c