summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2015-11-17 15:49:06 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-17 15:25:45 -0500
commit17b85d29e82cc3c874a497a8bc5764d6a2b043e2 (patch)
tree7234f1e9f3a38dff362a6efc9f775757ad9c5849 /net
parenta3a116e04cc6a94d595ead4e956ab1bc1d2f4746 (diff)
downloadlinux-17b85d29e82cc3c874a497a8bc5764d6a2b043e2.tar.bz2
net/core: revert "net: fix __netdev_update_features return.." and add comment
This reverts commit 00ee59271777 ("net: fix __netdev_update_features return on ndo_set_features failure") and adds a comment explaining why it's okay to return a value other than 0 upon error. Some drivers might actually change flags and return an error so it's better to fire a spurious notification rather than miss these. CC: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 5dbc86ea6b58..ae00b894e675 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6436,7 +6436,10 @@ int __netdev_update_features(struct net_device *dev)
netdev_err(dev,
"set_features() failed (%d); wanted %pNF, left %pNF\n",
err, &features, &dev->features);
- return 0;
+ /* return non-0 since some features might have changed and
+ * it's better to fire a spurious notification than miss it
+ */
+ return -1;
}
sync_lower: