From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx> --- 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