]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: versal: Return error in case if clock setup failed
authorJay Buddhabhatti <jay.buddhabhatti@xilinx.com>
Tue, 10 Jan 2023 07:23:44 +0000 (08:23 +0100)
committerMichal Simek <michal.simek@amd.com>
Mon, 16 Jan 2023 14:33:58 +0000 (15:33 +0100)
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
drivers/clk/clk_versal.c

index 76fde00491b23556fd974e5c4b05f93973d2ded3..faebbab1c6d3b426a70f0c282f85c1a46d321316 100644 (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;