Skip to content

Commit 12378e1

Browse files
tobluxbp3tk0v
authored andcommitted
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
1 parent d090551 commit 12378e1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/edac/amd64_edac.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3354,10 +3354,7 @@ static bool dct_ecc_enabled(struct amd64_pvt *pvt)
33543354

33553355
edac_dbg(3, "Node %d: DRAM ECC %s.\n", nid, str_enabled_disabled(ecc_en));
33563356

3357-
if (!ecc_en || !nb_mce_en)
3358-
return false;
3359-
else
3360-
return true;
3357+
return ecc_en && nb_mce_en;
33613358
}
33623359

33633360
static bool umc_ecc_enabled(struct amd64_pvt *pvt)

0 commit comments

Comments
 (0)