* [PATCH 5.15] media: atomisp: sh_css: check ia_css_pipeline_create_and_add_stage() return code
@ 2024-02-26 9:03 Alexandra Diupina
2024-02-26 9:50 ` kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: Alexandra Diupina @ 2024-02-26 9:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Alexandra Diupina, stable, Mauro Carvalho Chehab, Sakari Ailus,
Martiros Shakhzadyan, Hans Verkuil, linux-media, linux-staging,
linux-kernel, lvc-project
commit 912680064f94 ("media: atomisp: make sh_css similar to Intel Aero driver")
removes the affected code, but in versions
tags/v5.8-rc1~10^2~220 - tags/v5.17-rc1~114^2~261
there is no check for the return value of the
ia_css_pipeline_create_and_add_stage() function.
ia_css_pipeline_create_and_add_stage() may return an
error code, so check and return it on error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 7796e455170e ("media: staging: media: atomisp: Fix alignment and line length issues")
Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
---
drivers/staging/media/atomisp/pci/sh_css.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index ba25d0da8b81..8502adb75a5a 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -7912,6 +7912,10 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
out_frames, in_frame, NULL);
err = ia_css_pipeline_create_and_add_stage(me, &stage_desc,
NULL);
+ if (err) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
} else if (need_pp && current_stage) {
in_frame = current_stage->args.out_frame[0];
err = add_capture_pp_stage(pipe, me, in_frame,
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-26 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-26 9:03 [PATCH 5.15] media: atomisp: sh_css: check ia_css_pipeline_create_and_add_stage() return code Alexandra Diupina
2024-02-26 9:50 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox