diff mbox series

[1/2,v2] pinctrl: iproc-gpio: Silence probe deferral messages

Message ID 20230808180733.2081353-2-florian.fainelli@broadcom.com
State Accepted
Commit d2606a6365bde17ee7b1efda9443d6b2e15f6d5a
Headers show
Series [1/2,v2] pinctrl: iproc-gpio: Silence probe deferral messages | expand

Commit Message

Florian Fainelli Aug. 8, 2023, 6:07 p.m. UTC
We can have gpiochip_add_data() return -EPROBE_DEFER which will make us
produce the "unable to add GPIO chip" message which is confusing. Use
dev_err_probe() to silence probe deferral messages.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Linus Walleij Aug. 10, 2023, 8:41 a.m. UTC | #1
On Tue, Aug 8, 2023 at 8:07 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:

> We can have gpiochip_add_data() return -EPROBE_DEFER which will make us
> produce the "unable to add GPIO chip" message which is confusing. Use
> dev_err_probe() to silence probe deferral messages.
>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

Patch applied.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
index cc3eb7409ab3..0e3f787b93ef 100644
--- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
@@ -891,10 +891,8 @@  static int iproc_gpio_probe(struct platform_device *pdev)
 	}
 
 	ret = gpiochip_add_data(gc, chip);
-	if (ret < 0) {
-		dev_err(dev, "unable to add GPIO chip\n");
-		return ret;
-	}
+	if (ret < 0)
+		return dev_err_probe(dev, ret, "unable to add GPIO chip\n");
 
 	if (!no_pinconf) {
 		ret = iproc_gpio_register_pinconf(chip);