lkml.org 
[lkml]   [2023]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 3/7] EDAC/amd64: Merge two if statements into one in amd64_edac_init()
From
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(-)

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();
--
2.43.0

\
 
 \ /
  Last update: 2023-12-25 18:40    [W:0.061 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site