diff mbox series

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

Message ID 20230807213022.1862903-2-florian.fainelli@broadcom.com (mailing list archive)
State New, archived
Headers show
Series pinctrl: bcm: Use dev_err_probe() | expand

Commit Message

Florian Fainelli Aug. 7, 2023, 9:30 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Aug. 8, 2023, 1:09 p.m. UTC | #1
On Mon, Aug 07, 2023 at 02:30:21PM -0700, Florian Fainelli 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.

...

>  	ret = gpiochip_add_data(gc, chip);
>  	if (ret < 0) {
> -		dev_err(dev, "unable to add GPIO chip\n");
> +		dev_err_probe(dev, ret, "unable to add GPIO chip\n");
>  		return ret;

	return dev_err_probe(...);

>  	}
diff mbox series

Patch

diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
index cc3eb7409ab3..153bfd3a48a4 100644
--- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
@@ -892,7 +892,7 @@  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");
+		dev_err_probe(dev, ret, "unable to add GPIO chip\n");
 		return ret;
 	}