From: Jay Buddhabhatti Date: Tue, 10 Jan 2023 07:23:44 +0000 (+0100) Subject: clk: versal: Return error in case if clock setup failed X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=29b58bba91147c3c03dcb998a1efe4a4d026d7e1;p=u-boot.git 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 --- 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;