]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/team/team.c
Merge branch 'ufs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / drivers / net / team / team.c
index 85c01247f2e3858f33e901de1a37d3eaae0941d7..fba8c136aa7c1513b288e641cfe8cd6dca304ccd 100644 (file)
@@ -1643,7 +1643,6 @@ static void team_destructor(struct net_device *dev)
        struct team *team = netdev_priv(dev);
 
        free_percpu(team->pcpu_stats);
-       free_netdev(dev);
 }
 
 static int team_open(struct net_device *dev)
@@ -2079,7 +2078,8 @@ static void team_setup(struct net_device *dev)
 
        dev->netdev_ops = &team_netdev_ops;
        dev->ethtool_ops = &team_ethtool_ops;
-       dev->destructor = team_destructor;
+       dev->needs_free_netdev = true;
+       dev->priv_destructor = team_destructor;
        dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
        dev->priv_flags |= IFF_NO_QUEUE;
        dev->priv_flags |= IFF_TEAM;
@@ -2476,7 +2476,8 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
                        goto team_put;
                }
                err = nla_parse_nested(opt_attrs, TEAM_ATTR_OPTION_MAX,
-                                      nl_option, team_nl_option_policy);
+                                      nl_option, team_nl_option_policy,
+                                      info->extack);
                if (err)
                        goto team_put;
                if (!opt_attrs[TEAM_ATTR_OPTION_NAME] ||