Commit f3d384e3 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Mauro Carvalho Chehab

media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()

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: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Fixes: 5cc7522d ("media: sun6i: Add support for Allwinner CSI V3s")
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 41c991bd
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment