summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUdit Kumar <[email protected]>2024-08-29 14:04:53 +0530
committerTom Rini <[email protected]>2024-09-24 08:17:54 -0600
commit541d21cf08ed318a6088d90a7db423b1e50e4038 (patch)
treeefb169c950d0f9902e27d94c868c11cb19b459fe
parent1d2059560e21c35ecd6df2a34181216fba0d1e2e (diff)
ram: k3-ddrss: Handle error properly in lpddr4_start
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 <[email protected]> Signed-off-by: Udit Kumar <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
-rw-r--r--drivers/ram/k3-ddrss/lpddr4.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ram/k3-ddrss/lpddr4.c b/drivers/ram/k3-ddrss/lpddr4.c
index 11ef242a37b..9f9abfeca48 100644
--- a/drivers/ram/k3-ddrss/lpddr4.c
+++ b/drivers/ram/k3-ddrss/lpddr4.c
@@ -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;
}