lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220416053902.68517-2-dave@stgolabs.net>
Date:   Fri, 15 Apr 2022 22:38:57 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     linux-mm@...ck.org
Cc:     mhocko@...nel.org, akpm@...ux-foundation.org, rientjes@...gle.com,
        yosryahmed@...gle.com, hannes@...xchg.org, shakeelb@...gle.com,
        dave.hansen@...ux.intel.com, tim.c.chen@...ux.intel.com,
        roman.gushchin@...ux.dev, gthelen@...gle.com,
        a.manzanares@...sung.com, heekwon.p@...sung.com,
        gim.jongmin@...sung.com, dave@...olabs.net,
        linux-kernel@...r.kernel.org
Subject: [PATCH 1/6] drivers/base/node: cleanup register_node()

Trivially get rid of some unnecessary indentation.

Signed-off-by: Davidlohr Bueso <dave@...olabs.net>
---
 drivers/base/node.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index ec8bb24a5a22..6cdf25fd26c3 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -661,16 +661,16 @@ static int register_node(struct node *node, int num)
 	node->dev.bus = &node_subsys;
 	node->dev.release = node_device_release;
 	node->dev.groups = node_dev_groups;
-	error = device_register(&node->dev);
 
-	if (error)
+	error = device_register(&node->dev);
+	if (error) {
 		put_device(&node->dev);
-	else {
-		hugetlb_register_node(node);
-
-		compaction_register_node(node);
+		return error;
 	}
-	return error;
+
+	hugetlb_register_node(node);
+	compaction_register_node(node);
+	return 0;
 }
 
 /**
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ