[lvc-project] [PATCH] media: atomisp: remove dead error check in ia_css_stream_create()

Andrey Karelin a.karelin at ideco.ru
Fri Oct 16 13:55:50 MSK 2026


In ia_css_stream_create() the return value of
sh_css_pipe_get_viewfinder_frame_info() is not assigned to err, so the
"if (err) goto ERR;" that follows only re-tests the result of
sh_css_pipe_get_grid_info(), which has already been checked, and is
always false.

Propagating the error instead is not an option:
sh_css_pipe_get_viewfinder_frame_info() returns -EINVAL for capture
pipes in RAW and BAYER capture modes, which have no viewfinder output,
and atomisp_set_fmt_to_isp() selects IA_CSS_CAPTURE_MODE_RAW when a RAW
format is requested in capture run mode, so stream creation would start
failing for such configurations.

Remove the dead check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Andrey Karelin <a.karelin at ideco.ru>
---
 drivers/staging/media/atomisp/pci/sh_css.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 4a182dc384ca..6f8cec1f1d87 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -8120,8 +8120,6 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
 				sh_css_pipe_get_viewfinder_frame_info(curr_pipe,
 								      &pipe_info->vf_output_info[j],
 								      j);
-				if (err)
-					goto ERR;
 			}
 		}
 

base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
-- 
2.56.0





More information about the lvc-project mailing list