[PATCH] EDAC: Simplify return statement in dct_ecc_enabled()
From: Thorsten Blum
Date: Sat Feb 01 2025 - 08:11:03 EST
Simplify the return statement to improve the code's readability.
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
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 8414ceb43e4a..1f106b4fafdf 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3355,10 +3355,7 @@ static bool dct_ecc_enabled(struct amd64_pvt *pvt)
edac_dbg(3, "Node %d: DRAM ECC %s.\n", nid, (ecc_en ? "enabled" : "disabled"));
- if (!ecc_en || !nb_mce_en)
- return false;
- else
- return true;
+ return ecc_en && nb_mce_en;
}
static bool umc_ecc_enabled(struct amd64_pvt *pvt)
--
2.48.1