Re: media: staging/intel-ipu3: css - possible typo in array being assigned
From: Dan Carpenter
Date: Fri Aug 08 2025 - 10:18:20 EST
Yeah... It probably should be the below patch. The commit message would
say something like:
Subject: Fix copy and paste bug.
This code is copy and pasted from earlier in the function and the NULL
check should be if (p_pl) instead of if (p_tr). Except that p_pl is
never NULL and the check can be removed.
The impact of this bug is that for several callers the
"p_pl[pl_idx].cfg_set = pl_cfg_set" value is never set. (I wonder why
this didn't show up in testing?)"
regards,
dan carpenter
diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c b/drivers/staging/media/ipu3/ipu3-css-params.c
index 2c48d57a3180..2d1c38119258 100644
--- a/drivers/staging/media/ipu3/ipu3-css-params.c
+++ b/drivers/staging/media/ipu3/ipu3-css-params.c
@@ -1617,10 +1617,9 @@ imgu_css_acc_process_lines(const struct process_lines *pl,
/* Inside the grid */
p_pl[pl_idx].lines = process_lines;
- if (p_tr) {
- p_pl[pl_idx].cfg_set = pl_cfg_set;
- pl_cfg_set = 1 - pl_cfg_set;
- }
+ p_pl[pl_idx].cfg_set = pl_cfg_set;
+ pl_cfg_set = 1 - pl_cfg_set;
+
pl_idx++;
}
}