diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-07-18 14:31:54 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-07-18 14:31:54 +0800 |
commit | 16e243013beb93902693c4bb90e4348c99588429 (patch) | |
tree | 6a5858d948085974ef1f26bb1e4b546cfb44cfc5 /net/8021q/vlan.c | |
parent | 2120557722577d8cff75a33a799ad15582dbd8ef (diff) | |
parent | 5289d9c979092878f2bf741d8b365ef7565fb6db (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-androidlsk-v4.4-17.07-android
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index ad8d6e6b87ca..e20ae2d3c498 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -278,7 +278,8 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id) return 0; out_free_newdev: - free_netdev(new_dev); + if (new_dev->reg_state == NETREG_UNINITIALIZED) + free_netdev(new_dev); return err; } |