On 1/10/23 08:23, Michal Simek wrote:
From: Jay Buddhabhatti <[email protected]>
Currently probe is getting success even if clock setup is failed
because of that u-boot is trying to access invalid clocks. So return
error if clock setup failed.
Signed-off-by: Jay Buddhabhatti <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
---
drivers/clk/clk_versal.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 76fde00491b2..faebbab1c6d3 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -657,7 +657,9 @@ static int versal_clk_probe(struct udevice *dev)
if (ret < 0)
return -EINVAL;
- versal_clock_setup();
+ ret = versal_clock_setup();
+ if (ret < 0)
+ return ret;
priv->clk = clock;
Applied.
M