aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/fixed_phy.c
diff options
context:
space:
mode:
authorHubert Feurstein <h.feurstein@gmail.com>2019-07-30 11:46:23 +0200
committerDavid S. Miller <davem@davemloft.net>2019-07-30 09:54:45 -0700
commitab98c008ac761752cdc27f9eb053419feadeb2f7 (patch)
tree948b0c69f204707f556e6efe10cc5140f2c9629c /drivers/net/phy/fixed_phy.c
parentnet: smc911x: Mark expected switch fall-through (diff)
downloadlinux-dev-ab98c008ac761752cdc27f9eb053419feadeb2f7.tar.xz
linux-dev-ab98c008ac761752cdc27f9eb053419feadeb2f7.zip
net: phy: fixed_phy: print gpio error only if gpio node is present
It is perfectly ok to not have an gpio attached to the fixed-link node. So the driver should not throw an error message when the gpio is missing. Fixes: 5468e82f7034 ("net: phy: fixed-phy: Drop GPIO from fixed_phy_add()") Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/phy/fixed_phy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 3ffe46df249e..7c5265fd2b94 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -216,8 +216,10 @@ static struct gpio_desc *fixed_phy_get_gpiod(struct device_node *np)
if (IS_ERR(gpiod)) {
if (PTR_ERR(gpiod) == -EPROBE_DEFER)
return gpiod;
- pr_err("error getting GPIO for fixed link %pOF, proceed without\n",
- fixed_link_node);
+
+ if (PTR_ERR(gpiod) != -ENOENT)
+ pr_err("error getting GPIO for fixed link %pOF, proceed without\n",
+ fixed_link_node);
gpiod = NULL;
}