summaryrefslogtreecommitdiff
path: root/net/dsa/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/user.c')
-rw-r--r--net/dsa/user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/user.c b/net/dsa/user.c
index a74339680010..4a8de48a6f24 100644
--- a/net/dsa/user.c
+++ b/net/dsa/user.c
@@ -1230,7 +1230,7 @@ static int dsa_user_set_eee(struct net_device *dev, struct ethtool_keee *e)
int ret;
/* Check whether the switch supports EEE */
- if (ds->ops->support_eee && !ds->ops->support_eee(ds, dp->index))
+ if (!ds->ops->support_eee || !ds->ops->support_eee(ds, dp->index))
return -EOPNOTSUPP;
/* Port's PHY and MAC both need to be EEE capable */
@@ -1254,7 +1254,7 @@ static int dsa_user_get_eee(struct net_device *dev, struct ethtool_keee *e)
int ret;
/* Check whether the switch supports EEE */
- if (ds->ops->support_eee && !ds->ops->support_eee(ds, dp->index))
+ if (!ds->ops->support_eee || !ds->ops->support_eee(ds, dp->index))
return -EOPNOTSUPP;
/* Port's PHY and MAC both need to be EEE capable */