aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-02-01 14:09:54 +0100
committerBorislav Petkov (AMD) <bp@alien8.de>2025-02-28 13:21:43 +0100
commit12378e1c3ff8259d6269980dcfd0cbb46735ade7 (patch)
tree1b3d9a4541682a01a976f44dd5cdf77562fbd57e
parentEDAC: Use string choice helper functions (diff)
downloadwireguard-linux-12378e1c3ff8259d6269980dcfd0cbb46735ade7.tar.xz
wireguard-linux-12378e1c3ff8259d6269980dcfd0cbb46735ade7.zip
EDAC/amd64: Simplify return statement in dct_ecc_enabled()
Simplify the return statement to improve the code's readability. No functional changes. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Link: https://lore.kernel.org/r/20250201130953.1377-2-thorsten.blum@linux.dev
Diffstat (limited to '')
-rw-r--r--drivers/edac/amd64_edac.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index d133a5be5890..90f0eb7cc5b9 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3354,10 +3354,7 @@ static bool dct_ecc_enabled(struct amd64_pvt *pvt)
edac_dbg(3, "Node %d: DRAM ECC %s.\n", nid, str_enabled_disabled(ecc_en));
- 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)