diff options
author | Mans Rullgard <mans@mansr.com> | 2022-02-17 13:17:37 +0000 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-02-19 02:09:07 +0100 |
commit | f3d6c538c3dacd2c4c5aea0b2f8add3acc423875 (patch) | |
tree | 7054e7e4420621effd5f01dc1d9a70abc50a1ded /drivers/pinctrl/sunxi | |
parent | fbfc5fc3518f7e74e03c009acbd0b6c6547d395d (diff) |
pinctrl: sunxi: do not print error message for EPROBE_DEFER
Avoid printing an error message if getting a regulator fails with
EPROBE_DEFER. This can happen if, for example, a regulator supplying
one of the main banks is controlled by a PL pin.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20220217131737.10931-1-mans@mansr.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sunxi')
-rw-r--r-- | drivers/pinctrl/sunxi/pinctrl-sunxi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 80d6750c74a6..530c0f5d115f 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -777,11 +777,10 @@ static int sunxi_pmx_request(struct pinctrl_dev *pctldev, unsigned offset) snprintf(supply, sizeof(supply), "vcc-p%c", 'a' + bank); reg = regulator_get(pctl->dev, supply); - if (IS_ERR(reg)) { - dev_err(pctl->dev, "Couldn't get bank P%c regulator\n", - 'A' + bank); - return PTR_ERR(reg); - } + if (IS_ERR(reg)) + return dev_err_probe(pctl->dev, PTR_ERR(reg), + "Couldn't get bank P%c regulator\n", + 'A' + bank); ret = regulator_enable(reg); if (ret) { |