Skip to content

Commit 00ee592

Browse files
Nikolay Aleksandrovdavem330
authored andcommitted
net: fix __netdev_update_features return on ndo_set_features failure
If ndo_set_features fails __netdev_update_features() will return -1 but this is wrong because it is expected to return 0 if no features were changed (see netdev_update_features()), which will cause a netdev notifier to be called without any actual changes. Fix this by returning 0 if ndo_set_features fails. Fixes: 6cb6a27 ("net: Call netdev_features_change() from netdev_update_features()") CC: Michał Mirosław <[email protected]> Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5f8dc33 commit 00ee592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6433,7 +6433,7 @@ int __netdev_update_features(struct net_device *dev)
64336433
netdev_err(dev,
64346434
"set_features() failed (%d); wanted %pNF, left %pNF\n",
64356435
err, &features, &dev->features);
6436-
return -1;
6436+
return 0;
64376437
}
64386438

64396439
sync_lower:

0 commit comments

Comments
 (0)