diff options
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r-- | drivers/base/node.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index ee090ab9171c..c5f81fc621ac 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -315,7 +315,9 @@ static int register_node(struct node *node, int num) node->dev.groups = node_dev_groups; error = device_register(&node->dev); - if (!error){ + if (error) + put_device(&node->dev); + else { hugetlb_register_node(node); compaction_register_node(node); |