media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
PATCH 1/1 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.
--- drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c +3 -1
@@ -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;
Signature · 1 line
2.17.1
Quoted 7 lines · Jia-Ju Bai
When
sun6i_video_remote_subdev()returns NULL to subdev, no error return code ofsun6i_video_start_streaming()is assigned.
To fix this bug, ret is assigned with-EINVALin this case.Reported-by TOTE Robot <[email protected]>Signed-off-by Jia-Ju Bai <[email protected]>
This should have the tag:
Please try to add them when fixing bugs. And this should also be tagged for stable, so
Otherwise,
Quoted 11 lines · Chen-Yu Tsai
Quoted 6 lines · Jia-Ju Bai
When
sun6i_video_remote_subdev()returns NULL to subdev, no error return code ofsun6i_video_start_streaming()is assigned.
To fix this bug, ret is assigned with-EINVALin this case.Reported-by TOTE Robot <[email protected]>Signed-off-by Jia-Ju Bai <[email protected]>This should have the tag:
Fixes 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
Quoted 8 lines
Please try to add them when fixing bugs. And this should also be tagged for stable, so
Cc <[email protected]>Otherwise,
Acked-by Chen-Yu Tsai <[email protected]>
Thanks for the advice :)
I will add the fixes and stable tags in my future patches.
Best wishes,
Jia-Ju Bai