From 2b72a6b0f1a29d8237ed44160f54a70bc9d68bb8 Mon Sep 17 00:00:00 2001 From: Jay Buddhabhatti Date: Tue, 10 Jan 2023 08:23:44 +0100 Subject: [PATCH] clk: versal: Return error in case if clock setup failed 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 Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/fa78e71211e5f68f8dc1353b357f96e6283f65a8.1673335422.git.michal.simek@amd.com --- 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 76fde00491..faebbab1c6 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; -- 2.39.5