media: sun6i-csi: Allow the video device to be open multiple times
authorOndrej Jirman <megous@megous.com>
Wed, 8 Sep 2021 10:56:09 +0000 (12:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:28 +0000 (19:16 +0100)
commit0fd64cd9ffdeb2241f611c453a9e288523abc589
tree722307ad8b3af07f50bad482c84273b7c441212d
parente44fa27c650fd644cc843afa3b0b9e7b1928a1bb
media: sun6i-csi: Allow the video device to be open multiple times

[ Upstream commit 8ed852834683ebe064157e069af8dfb41cad6403 ]

Previously it was possible, but a recent fix for uninitialized
`ret` variable broke this behavior.

v4l2_fh_is_singular_file() check is there just to determine
whether the power needs to be enabled, and it's not a failure
if it returns false.

Fixes: ba9139116bc0 ("media: sun6i-csi: add a missing return code")
Signed-off-by: Ondrej Jirman <megous@megous.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c