media: staging/intel-ipu3: css: Correctly reset some memory
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 22 Aug 2020 13:11:24 +0000 (15:11 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 10 Sep 2020 12:09:04 +0000 (14:09 +0200)
The intent here is to reset the whole 'scaler_coeffs_luma' array, not just
the first element.

Fixes: e11110a5b744 ("media: staging/intel-ipu3: css: Compute and program ccs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/ipu3/ipu3-css-params.c

index fbd53d7..e9d6bd9 100644 (file)
@@ -159,7 +159,7 @@ imgu_css_scaler_calc(u32 input_width, u32 input_height, u32 target_width,
 
        memset(&cfg->scaler_coeffs_chroma, 0,
               sizeof(cfg->scaler_coeffs_chroma));
-       memset(&cfg->scaler_coeffs_luma, 0, sizeof(*cfg->scaler_coeffs_luma));
+       memset(&cfg->scaler_coeffs_luma, 0, sizeof(cfg->scaler_coeffs_luma));
        do {
                phase_step_correction++;