media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
[ Upstream commitf3d384e366] When sun6i_video_remote_subdev() returns NULL to subdev, no error return code of sun6i_video_start_streaming() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Fixes:5cc7522d89("media: sun6i: Add support for Allwinner CSI V3s") Acked-by: Chen-Yu Tsai <wens@csie.org> 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>
This commit is contained in:
parent
00b68a7478
commit
697af15095
1 changed files with 3 additions and 1 deletions
|
|
@ -151,8 +151,10 @@ static int sun6i_video_start_streaming(struct vb2_queue *vq, unsigned int count)
|
|||
}
|
||||
|
||||
subdev = sun6i_video_remote_subdev(video, NULL);
|
||||
if (!subdev)
|
||||
if (!subdev) {
|
||||
ret = -EINVAL;
|
||||
goto stop_media_pipeline;
|
||||
}
|
||||
|
||||
config.pixelformat = video->fmt.fmt.pix.pixelformat;
|
||||
config.code = video->mbus_code;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue