clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
[deliverable/linux.git] / drivers / clk / ti / clk-dra7-atl.c
index d86bc46b93bdfeae630f94a55745315a0d8c1ec8..0a1df821860fdc01ed9dc2278111b1b4150ed62b 100644 (file)
@@ -252,6 +252,11 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
                }
 
                clk = of_clk_get_from_provider(&clkspec);
+               if (IS_ERR(clk)) {
+                       pr_err("%s: failed to get atl clock %d from provider\n",
+                              __func__, i);
+                       return PTR_ERR(clk);
+               }
 
                cdesc = to_atl_desc(__clk_get_hw(clk));
                cdesc->cinfo = cinfo;
This page took 0.028222 seconds and 5 git commands to generate.