public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFT] media: atomisp: Add error check in create_host_regular_capture_pipeline()
@ 2026-04-23  6:02 Robertus Diawan Chris
  2026-04-23  7:17 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Robertus Diawan Chris @ 2026-04-23  6:02 UTC (permalink / raw)
  To: andy, hansg, mchehab, sakari.ailus, gregkh
  Cc: linux-kernel, linux-media, linux-staging, linux-kernel-mentees,
	skhan, me

When calling ia_css_pipeline_create_and_add_stage() function, there's no
condition to check whether ia_css_pipeline_create_and_add_stage() throw
an error or not. So add conditional check for the return value of
ia_css_pipeline_create_and_add_stage() function.

This is reported by Coverity Scan with CID 1408952 as UNUSED_VALUE.

Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com>
---
I am not sure if omitting the error check is intentional or not, but from
what I see from another ia_css_pipeline_create_and_add_stage() usage
in the same function, we check the return value after the call and return
the error code if it's non-zero.

I also don't have the device to test this change.

 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 6cda5925fa45..6aa8a883cc76 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -7041,6 +7041,10 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
 			err = ia_css_pipeline_create_and_add_stage(me,
 								   &stage_desc,
 								   &current_stage);
+			if (err) {
+				IA_CSS_LEAVE_ERR_PRIVATE(err);
+				return err;
+			}
 			local_in_frame = current_stage->args.out_frame[0];
 		}
 		err = add_capture_pp_stage(pipe, me, local_in_frame,

base-commit: 2e68039281932e6dc37718a1ea7cbb8e2cda42e6
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RFT] media: atomisp: Add error check in create_host_regular_capture_pipeline()
  2026-04-23  6:02 [PATCH RFT] media: atomisp: Add error check in create_host_regular_capture_pipeline() Robertus Diawan Chris
@ 2026-04-23  7:17 ` Dan Carpenter
  2026-04-24  5:47   ` Robertus Diawan Chris
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2026-04-23  7:17 UTC (permalink / raw)
  To: Robertus Diawan Chris
  Cc: andy, hansg, mchehab, sakari.ailus, gregkh, linux-kernel,
	linux-media, linux-staging, linux-kernel-mentees, skhan, me

On Thu, Apr 23, 2026 at 01:02:46PM +0700, Robertus Diawan Chris wrote:
> When calling ia_css_pipeline_create_and_add_stage() function, there's no
> condition to check whether ia_css_pipeline_create_and_add_stage() throw
> an error or not. So add conditional check for the return value of
> ia_css_pipeline_create_and_add_stage() function.
> 
> This is reported by Coverity Scan with CID 1408952 as UNUSED_VALUE.
> 
> Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com>
> ---

You need a Fixes tag.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RFT] media: atomisp: Add error check in create_host_regular_capture_pipeline()
  2026-04-23  7:17 ` Dan Carpenter
@ 2026-04-24  5:47   ` Robertus Diawan Chris
  0 siblings, 0 replies; 3+ messages in thread
From: Robertus Diawan Chris @ 2026-04-24  5:47 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: andy, hansg, mchehab, sakari.ailus, gregkh, linux-kernel,
	linux-media, linux-staging, linux-kernel-mentees, skhan, me

Hello Dan,

On Thu, Apr 23, 2026 at 10:17:13AM +0300, Dan Carpenter wrote:
> On Thu, Apr 23, 2026 at 01:02:46PM +0700, Robertus Diawan Chris wrote:
> > When calling ia_css_pipeline_create_and_add_stage() function, there's no
> > condition to check whether ia_css_pipeline_create_and_add_stage() throw
> > an error or not. So add conditional check for the return value of
> > ia_css_pipeline_create_and_add_stage() function.
> >
> > This is reported by Coverity Scan with CID 1408952 as UNUSED_VALUE.
> >
> > Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com>
> > ---
>
> You need a Fixes tag.

Oh I didn't know that we need to add Fixes tag too. Alright, I will add
Fixes tag in the next iteration of the patch.

Thank you for the feedback.

Best regards,
Robertus Diawan Chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-24  5:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23  6:02 [PATCH RFT] media: atomisp: Add error check in create_host_regular_capture_pipeline() Robertus Diawan Chris
2026-04-23  7:17 ` Dan Carpenter
2026-04-24  5:47   ` Robertus Diawan Chris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox