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 <jay.buddhabhatti@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/fa78e71211e5f68f8dc1353b357f96e6283f65a8.1673335422.git.michal.simek@amd.com
This commit is contained in:
Jay Buddhabhatti 2023-01-10 08:23:44 +01:00 committed by Michal Simek
parent 2732035da9
commit 29b58bba91

View file

@ -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;