Skip to content

Commit

Permalink
EDAC/amd64: Simplify return statement in dct_ecc_enabled()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thorsten Blum authored and Borislav Petkov (AMD) committed Feb 28, 2025
1 parent d090551 commit 12378e1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 12378e1

Please sign in to comment.