From: Christian Gmeiner <christian.gmeiner@gmail.com>
Date: Wed, 23 Mar 2022 15:04:28 +0000 (+0100)
Subject: ram: k3-am654: Make VTT regulator optional
X-Git-Tag: v2025.01-rc5-pxa1908~1475^2
X-Git-Url: http://git.dujemihanovic.xyz/img/%22http:/www.sics.se/static/static/gitweb.css?a=commitdiff_plain;h=da61ee662554f98fac0ab19c6b893edd82edb098;p=u-boot.git

ram: k3-am654: Make VTT regulator optional

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---

diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index a48ebe6ada..4453c247b2 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -884,9 +884,8 @@ static int am654_ddrss_power_on(struct am654_ddrss_desc *ddrss)
 	device_get_supply_regulator(ddrss->dev, "vtt-supply",
 				    &ddrss->vtt_supply);
 	ret = regulator_set_value(ddrss->vtt_supply, 3300000);
-	if (ret)
-		return ret;
-	debug("VTT regulator enabled\n");
+	if (ret == 0)
+		debug("VTT regulator enabled\n");
 #endif
 
 	return 0;