diff options
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r-- | drivers/base/node.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index bc9f43bf7e29..8f7ed9933a7c 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -599,7 +599,11 @@ int register_one_node(int nid) | |||
599 | 599 | ||
600 | void unregister_one_node(int nid) | 600 | void unregister_one_node(int nid) |
601 | { | 601 | { |
602 | if (!node_devices[nid]) | ||
603 | return; | ||
604 | |||
602 | unregister_node(node_devices[nid]); | 605 | unregister_node(node_devices[nid]); |
606 | kfree(node_devices[nid]); | ||
603 | node_devices[nid] = NULL; | 607 | node_devices[nid] = NULL; |
604 | } | 608 | } |
605 | 609 | ||