On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@xxxxxxxxxxxx> wrote: > @@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev) > if (ret) > goto destroy_mutex; > > - scp->clk = devm_clk_get(dev, "main"); > - if (IS_ERR(scp->clk)) { > - dev_err(dev, "Failed to get clock\n"); > - ret = PTR_ERR(scp->clk); > - goto release_dev_mem; > + if (of_get_property(np, "clocks", NULL)) { > + scp->clk = devm_clk_get(dev, "main"); > + if (IS_ERR(scp->clk)) { > + dev_err(dev, "Failed to get clock\n"); > + ret = PTR_ERR(scp->clk); > + goto release_dev_mem; > + } Use devm_clk_get_optional().