* [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
@ 2021-03-06 14:15 ` Jia-Ju Bai
0 siblings, 0 replies; 6+ messages in thread
From: Jia-Ju Bai @ 2021-03-06 14:15 UTC (permalink / raw)
To: yong.deng, mchehab, mripard, wens, jernej.skrabec
Cc: linux-media, linux-arm-kernel, linux-kernel, Jia-Ju Bai
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>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
index b55de9ab64d8..3181d0781b61 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
@@ -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;
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
@ 2021-03-06 14:15 ` Jia-Ju Bai
0 siblings, 0 replies; 6+ messages in thread
From: Jia-Ju Bai @ 2021-03-06 14:15 UTC (permalink / raw)
To: yong.deng, mchehab, mripard, wens, jernej.skrabec
Cc: linux-media, linux-arm-kernel, linux-kernel, Jia-Ju Bai
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>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
index b55de9ab64d8..3181d0781b61 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
@@ -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;
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
2021-03-06 14:15 ` Jia-Ju Bai
@ 2021-03-07 12:47 ` Chen-Yu Tsai
-1 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2021-03-07 12:47 UTC (permalink / raw)
To: Jia-Ju Bai
Cc: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Jernej Skrabec,
Linux Media Mailing List, linux-arm-kernel, linux-kernel
On Sat, Mar 6, 2021 at 10:15 PM Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>
> 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>
This should have the tag:
Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
Please try to add them when fixing bugs. And this should also be tagged
for stable, so
Cc: <stable@kernel.org>
Otherwise,
Acked-by: Chen-Yu Tsai <wens@csie.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
@ 2021-03-07 12:47 ` Chen-Yu Tsai
0 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2021-03-07 12:47 UTC (permalink / raw)
To: Jia-Ju Bai
Cc: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Jernej Skrabec,
Linux Media Mailing List, linux-arm-kernel, linux-kernel
On Sat, Mar 6, 2021 at 10:15 PM Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>
> 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>
This should have the tag:
Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
Please try to add them when fixing bugs. And this should also be tagged
for stable, so
Cc: <stable@kernel.org>
Otherwise,
Acked-by: Chen-Yu Tsai <wens@csie.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
2021-03-07 12:47 ` Chen-Yu Tsai
@ 2021-03-08 2:54 ` Jia-Ju Bai
-1 siblings, 0 replies; 6+ messages in thread
From: Jia-Ju Bai @ 2021-03-08 2:54 UTC (permalink / raw)
To: wens
Cc: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Jernej Skrabec,
Linux Media Mailing List, linux-arm-kernel, linux-kernel
On 2021/3/7 20:47, Chen-Yu Tsai wrote:
> On Sat, Mar 6, 2021 at 10:15 PM Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>> 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>
> This should have the tag:
>
> Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
>
> Please try to add them when fixing bugs. And this should also be tagged
> for stable, so
>
> Cc: <stable@kernel.org>
>
> Otherwise,
>
> Acked-by: Chen-Yu Tsai <wens@csie.org>
Thanks for the advice :)
I will add the fixes and stable tags in my future patches.
Best wishes,
Jia-Ju Bai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming()
@ 2021-03-08 2:54 ` Jia-Ju Bai
0 siblings, 0 replies; 6+ messages in thread
From: Jia-Ju Bai @ 2021-03-08 2:54 UTC (permalink / raw)
To: wens
Cc: Yong Deng, Mauro Carvalho Chehab, Maxime Ripard, Jernej Skrabec,
Linux Media Mailing List, linux-arm-kernel, linux-kernel
On 2021/3/7 20:47, Chen-Yu Tsai wrote:
> On Sat, Mar 6, 2021 at 10:15 PM Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>> 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>
> This should have the tag:
>
> Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
>
> Please try to add them when fixing bugs. And this should also be tagged
> for stable, so
>
> Cc: <stable@kernel.org>
>
> Otherwise,
>
> Acked-by: Chen-Yu Tsai <wens@csie.org>
Thanks for the advice :)
I will add the fixes and stable tags in my future patches.
Best wishes,
Jia-Ju Bai
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-08 2:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 14:15 [PATCH] media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming() Jia-Ju Bai
2021-03-06 14:15 ` Jia-Ju Bai
2021-03-07 12:47 ` Chen-Yu Tsai
2021-03-07 12:47 ` Chen-Yu Tsai
2021-03-08 2:54 ` Jia-Ju Bai
2021-03-08 2:54 ` Jia-Ju Bai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.