aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/fixed_phy.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2015-01-20 16:41:59 -0800
committerDavid S. Miller <davem@davemloft.net>2015-01-25 16:02:13 -0800
commit799d44442c4821dec65fc59baa4ddc6783a25c54 (patch)
tree0b1654e49e30cd05524b04829eb2a4df807b3ed0 /drivers/net/phy/fixed_phy.c
parentnet: ipv6: Add sysctl entry to disable MTU updates from RA (diff)
downloadlinux-dev-799d44442c4821dec65fc59baa4ddc6783a25c54.tar.xz
linux-dev-799d44442c4821dec65fc59baa4ddc6783a25c54.zip
net: phy: fixed: allow setting no update_link callback
fixed_phy_set_link_update() contains an early check against a NULL callback pointer, which basically prevents us from removing any previous callback we may have set. The users of the fp->link_update callback deal with a NULL callback just fine, so we really want to allow "removing" a link_update callback to avoid dangling callback pointers during e.g: module removal. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/fixed_phy.c')
-rw-r--r--drivers/net/phy/fixed_phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 3ad0e6e16c39..a08a3c78ba97 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -168,7 +168,7 @@ int fixed_phy_set_link_update(struct phy_device *phydev,
struct fixed_mdio_bus *fmb = &platform_fmb;
struct fixed_phy *fp;
- if (!link_update || !phydev || !phydev->bus)
+ if (!phydev || !phydev->bus)
return -EINVAL;
list_for_each_entry(fp, &fmb->phys, node) {