]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ram: k3-ddrss: Handle error properly in lpddr4_start
authorUdit Kumar <u-kumar1@ti.com>
Thu, 29 Aug 2024 08:34:53 +0000 (14:04 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 24 Sep 2024 14:17:54 +0000 (08:17 -0600)
In lpddr4_start function error returned by lpddr4_enablepiinitiator
may go undetected due to overwrite of return code.
Add support to handle error in above case.

Reported-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
drivers/ram/k3-ddrss/lpddr4.c

index 11ef242a37bef90a6de78f964b0c26fe70b277c6..9f9abfeca489d18ba232bd38b81594a4bb621511 100644 (file)
@@ -155,10 +155,11 @@ u32 lpddr4_start(const lpddr4_privatedata *pd)
        u32 result = 0U;
 
        result = lpddr4_startsf(pd);
-       if (result == (u32)0) {
+       if (result == (u32)0)
                result = lpddr4_enablepiinitiator(pd);
+       if (result == (u32)0)
                result = lpddr4_startsequencecontroller(pd);
-       }
+
        return result;
 }