diff mbox series

[3/7] EDAC/amd64: Merge two if statements into one in amd64_edac_init()

Message ID 644d3bff-5a21-47d2-9e36-06475d472253@web.de (mailing list archive)
State New, archived
Headers show
Series EDAC/amd64: Adjustments for two function implementations | expand

Commit Message

Markus Elfring Dec. 25, 2023, 5:38 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 25 Dec 2023 16:45:37 +0100

Two if statements were connected with the same return statements.
Thus merge their condition checks into one statement.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/edac/amd64_edac.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--
2.43.0
diff mbox series

Patch

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 8a27a4af7121..49f3d9b54902 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -4406,10 +4406,7 @@  static int __init amd64_edac_init(void)
 	if (owner && strncmp(owner, EDAC_MOD_STR, sizeof(EDAC_MOD_STR)))
 		return -EBUSY;

-	if (!x86_match_cpu(amd64_cpuids))
-		return -ENODEV;
-
-	if (!amd_nb_num())
+	if (!x86_match_cpu(amd64_cpuids) || !amd_nb_num())
 		return -ENODEV;

 	opstate_init();