media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Sat, 6 Mar 2021 14:15:28 +0000 (15:15 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 22 Mar 2021 09:20:35 +0000 (10:20 +0100)
commitf3d384e36630e2a552d874e422835606d9cf230a
tree1725468b952cf5122329d7c831ca02475b49cefe
parent41c991bd234982fb2a4e4ecfae68db711a6e3b31
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: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Fixes: 5cc7522d8965 ("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>
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c