summaryrefslogtreecommitdiffstats
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-07-26 19:52:16 +0200
committerIngo Molnar <mingo@kernel.org>2020-07-26 19:52:30 +0200
commit2d65685a4a6ff6ef6bfe42717222db92c04224c2 (patch)
tree894aebbf77ce53375e999cd5c6bb34ee5d28bb9f /net/core/rtnetlink.c
parentde0038bfaf53af0e8bc4961b7aacdcb79f43bf08 (diff)
parentfbe0d451bcea569fc0ed3455511a90646c8a9c81 (diff)
downloadlinux-2d65685a4a6ff6ef6bfe42717222db92c04224c2.tar.bz2
Merge branch 'x86/urgent' into x86/cleanups
Refresh the branch for a dependent commit. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 9aedc15736ad..85a4b0101f76 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3343,7 +3343,8 @@ replay:
*/
if (err < 0) {
/* If device is not registered at all, free it now */
- if (dev->reg_state == NETREG_UNINITIALIZED)
+ if (dev->reg_state == NETREG_UNINITIALIZED ||
+ dev->reg_state == NETREG_UNREGISTERED)
free_netdev(dev);
goto out;
}