]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
soc: ti: k3-navss-ringacc: Do not use uninitialised variable
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Tue, 12 Aug 2025 10:13:50 +0000 (11:13 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 19 Aug 2025 17:26:07 +0000 (11:26 -0600)
In k3_nav_ringacc_probe_dt there can be no error code returned from
dev_read_u32_default so ret is not assigned to and should not be used.
Remove the use of ret from the dev_err call as it is unitialised.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/soc/ti/k3-navss-ringacc.c

index ac29158d489020ab253a035dc76cf21bca3c2230..d37c454143b2d1beb5e45764c27ff00891bedab1 100644 (file)
@@ -932,7 +932,7 @@ static int k3_nav_ringacc_probe_dt(struct k3_nav_ringacc *ringacc)
 
        ringacc->num_rings = dev_read_u32_default(dev, "ti,num-rings", 0);
        if (!ringacc->num_rings) {
-               dev_err(dev, "ti,num-rings read failure %d\n", ret);
+               dev_err(dev, "ti,num-rings read failure\n");
                return -EINVAL;
        }