@@ -3294,22 +3292,15 @@ static int macb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
/* Pass the order to phylink layer */
ret = phylink_ethtool_set_wol(bp->phylink, wol);
- /* Don't manage WoL on MAC if handled by the PHY
- * or if there's a failure in talking to the PHY
- */
- if (!ret || ret != -EOPNOTSUPP)
+ /* Don't manage WoL on MAC if there's a failure in talking to the PHY */
+ if (!!ret && ret != -EOPNOTSUPP)
return ret;
The comment is wrong. You could be happily talking to the PHY, it just
does not support what you asked it to do.