]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
remoteproc: k3-r5: Ensure ret is initialised
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 8 Aug 2025 12:00:23 +0000 (13:00 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 19 Aug 2025 17:25:56 +0000 (11:25 -0600)
In k3_r5f_split_reset and k3_r5f_unprepare ret may not have been
assigned to before the code reaches the return ret at the function exit.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/remoteproc/ti_k3_r5f_rproc.c

index f4bab6868ee65bcf6bcceb0264929c5600bf102a..3a25ef6bf8780c1b48109e62bb7750b89fe306ea 100644 (file)
@@ -441,7 +441,7 @@ proc_release:
 
 static int k3_r5f_split_reset(struct k3_r5f_core *core)
 {
-       int ret;
+       int ret = 0;
 
        dev_dbg(core->dev, "%s\n", __func__);
 
@@ -476,7 +476,7 @@ static int k3_r5f_unprepare(struct udevice *dev)
 {
        struct k3_r5f_core *core = dev_get_priv(dev);
        struct k3_r5f_cluster *cluster = core->cluster;
-       int ret;
+       int ret = 0;
 
        dev_dbg(dev, "%s\n", __func__);