[PATCH] media: atomisp: check load_copy_binary() result in load_advanced_binaries()

From: Andrey Karelin

Date: Tue Oct 20 2026 - 11:21:01 EST


load_advanced_binaries() ignores the return value of load_copy_binary(),
unlike all other callers of this function. If no suitable ISP copy
binary is found, the error is lost, the copy binary stays unloaded and
the capture pipeline is created without the copy stage although it is
required (always on ISP2400, for direct sensor input on ISP2401).

Propagate the error to the caller as the other binary loading steps in
this function already do.

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

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Andrey Karelin <a.karelin@xxxxxxxx>
---
drivers/staging/media/atomisp/pci/sh_css.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 4a182dc384ca..3f3671ceca59 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -5459,9 +5459,9 @@ static int load_advanced_binaries(struct ia_css_pipe *pipe)
need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;

if (need_isp_copy)
- load_copy_binary(pipe,
- &pipe->pipe_settings.capture.copy_binary,
- &pipe->pipe_settings.capture.pre_isp_binary);
+ err = load_copy_binary(pipe,
+ &pipe->pipe_settings.capture.copy_binary,
+ &pipe->pipe_settings.capture.pre_isp_binary);

return err;
}

base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
--
2.56.0