]> git.hungrycats.org Git - linux/commitdiff
ASoC: rockchip: rockchip_i2s: Propagate -EPROBE_DEFER from devm_pinctrl_get()
authorbui duc phuc <phucduc.bui@gmail.com>
Thu, 6 Aug 2026 05:21:27 +0000 (12:21 +0700)
committerMark Brown <broonie@kernel.org>
Thu, 13 Aug 2026 14:46:00 +0000 (15:46 +0100)
Return -EPROBE_DEFER from devm_pinctrl_get() instead of ignoring it and
continuing probe. This allows the driver to be reprobed once the
pinctrl provider becomes available.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260806052136.21034-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s.c

index 354430f916f9fe69fe6d538b6c467608e2b436f4..261f36d4c2fd4f508273477edf0c38fc1fb6c2d5 100644 (file)
@@ -790,7 +790,11 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
 
        i2s->bclk_ratio = 64;
        i2s->pinctrl = devm_pinctrl_get(&pdev->dev);
-       if (!IS_ERR(i2s->pinctrl)) {
+       if (IS_ERR(i2s->pinctrl)) {
+               if (PTR_ERR(i2s->pinctrl) == -EPROBE_DEFER)
+                       return -EPROBE_DEFER;
+               dev_dbg(&pdev->dev, "failed to find i2s pinctrl\n");
+       } else {
                i2s->bclk_on = pinctrl_lookup_state(i2s->pinctrl, "bclk_on");
                if (!IS_ERR_OR_NULL(i2s->bclk_on)) {
                        i2s->bclk_off = pinctrl_lookup_state(i2s->pinctrl, "bclk_off");
@@ -799,8 +803,6 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
                                return -EINVAL;
                        }
                }
-       } else {
-               dev_dbg(&pdev->dev, "failed to find i2s pinctrl\n");
        }
 
        i2s_pinctrl_select_bclk_off(i2s);