[PATCH 3/4] OF: gpio: Silence error message on -EPROBE_DEFER

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Thu Apr 9 18:02:45 PDT 2015


With deferred probing, -EPROBE_DEFER is not worth spilling an error.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
---
Cc: barebox at lists.infradead.org
---
 drivers/of/of_gpio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/of/of_gpio.c b/drivers/of/of_gpio.c
index 6738a220a5a3..470ccfa1ba77 100644
--- a/drivers/of/of_gpio.c
+++ b/drivers/of/of_gpio.c
@@ -39,8 +39,9 @@ int of_get_named_gpio_flags(struct device_node *np, const char *propname,
 
 	ret = gpio_get_num(dev, out_args.args[0]);
 	if (ret < 0) {
-		pr_err("%s: unable to get gpio num of device %s: %d\n",
-			__func__, dev_name(dev), ret);
+		if (ret != -EPROBE_DEFER)
+			pr_err("%s: unable to get gpio num of device %s: %d\n",
+			       __func__, dev_name(dev), ret);
 		return ret;
 	}
 
-- 
2.1.0




More information about the barebox mailing list