]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
ddr: fsl: Provide initial value for zqcs_init
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 24 Jul 2025 15:32:55 +0000 (16:32 +0100)
committerPeng Fan <peng.fan@nxp.com>
Wed, 27 Aug 2025 07:39:05 +0000 (15:39 +0800)
In the case of !zq_en zqcs_init is never assigned to although its value
is used. Correct by initialising zqcs_init to 0.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/ddr/fsl/ctrl_regs.c

index 9a25192c079803dcbf9fc684ce339f57537baf74..fea08c9000f4b1f171e30d4ddc09a7f81c49fa79 100644 (file)
@@ -2173,7 +2173,7 @@ static void set_ddr_zq_cntl(fsl_ddr_cfg_regs_t *ddr, unsigned int zq_en)
        /* Normal Operation Short Calibration Time (tZQCS) */
        unsigned int zqcs = 0;
 #ifdef CONFIG_SYS_FSL_DDR4
-       unsigned int zqcs_init;
+       unsigned int zqcs_init = 0;
 #endif
 
        if (zq_en) {