diff mbox series

clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers

Message ID 1553489997-1495-1-git-send-email-shubhrajyoti.datta@gmail.com (mailing list archive)
State Superseded, archived
Headers show
Series clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers | expand

Commit Message

Shubhrajyoti Datta March 25, 2019, 4:59 a.m. UTC
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

In case the provider clock is not yet proved the fixed factor does not
find the name of the input clock and it returns ENOMEM.
Let's return DEFER in such cases.

Fixes a boot failure on zynqmp.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
The other option is to provide the name is the output-clocks

 drivers/clk/clk-fixed-factor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index 241b3f8..a3ea6b8 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -221,7 +221,7 @@  static int of_fixed_factor_clk_probe(struct platform_device *pdev)
 	 */
 	clk = _of_fixed_factor_clk_setup(pdev->dev.of_node);
 	if (IS_ERR(clk))
-		return PTR_ERR(clk);
+		return -EPROBE_DEFER;
 
 	platform_set_drvdata(pdev, clk);