[PATCH 1/2 v2] pinctrl: iproc-gpio: Silence probe deferral messages
Florian Fainelli
florian.fainelli at broadcom.com
Tue Aug 8 11:07:32 PDT 2023
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 at broadcom.com>
---
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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);
--
2.34.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4221 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230808/f2f729d5/attachment-0001.p7s>
More information about the linux-arm-kernel
mailing list