]> git.baikalelectronics.ru Git - kernel.git/commitdiff
PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 19 May 2017 10:50:35 +0000 (16:20 +0530)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 12 Jun 2017 01:12:07 +0000 (10:12 +0900)
clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/event/exynos-nocp.c

index 5c3e7b11e8a66c4853a1aabf9850537eea26767a..f6e7956fc91a212538b0ce937fe34f17aa73f073 100644 (file)
@@ -267,7 +267,11 @@ static int exynos_nocp_probe(struct platform_device *pdev)
        }
        platform_set_drvdata(pdev, nocp);
 
-       clk_prepare_enable(nocp->clk);
+       ret = clk_prepare_enable(nocp->clk);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to prepare ppmu clock\n");
+               return ret;
+       }
 
        pr_info("exynos-nocp: new NoC Probe device registered: %s\n",
                        dev_name(dev));