ASoC: bcm2835: Silence clk_get() error on -EPROBE_DEFER 75/239575/1 accepted/tizen/unified/20200729.165701 submit/tizen/20200728.021629
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 24 Jul 2020 04:11:08 +0000 (13:11 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 28 Jul 2020 01:28:26 +0000 (10:28 +0900)
Silence clk_get() error with dev_dbg() on -EPROBE_DEFER.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[sw0312.kim: post on mainline, https://patchwork.kernel.org/patch/11687251/ and apply]

Change-Id: I770815bd80af8ee0fa856f14d5d075d9471208c7

sound/soc/bcm/bcm2835-i2s.c

index e6a12e2..66b895e 100644 (file)
@@ -841,9 +841,12 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
        dev->clk_prepared = false;
        dev->clk = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(dev->clk)) {
-               dev_err(&pdev->dev, "could not get clk: %ld\n",
-                       PTR_ERR(dev->clk));
-               return PTR_ERR(dev->clk);
+               ret = PTR_ERR(dev->clk);
+               if (ret == -EPROBE_DEFER)
+                       dev_dbg(&pdev->dev, "could not get clk: %d\n", ret);
+               else
+                       dev_err(&pdev->dev, "could not get clk: %d\n", ret);
+               return ret;
        }
 
        /* Request ioarea */