Skip to content

Commit 612905e

Browse files
Nikolay Borisovbp3tk0v
authored andcommitted
x86/mce: Remove redundant check from mce_device_create()
mce_device_create() is called only from mce_cpu_online() which in turn will be called iff MCA support is available. That is, at the time of mce_device_create() call it's guaranteed that MCA support is available. No need to duplicate this check so remove it. [ bp: Massage commit message. ] Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20231107165529.407349-1-nik.borisov@suse.com
1 parent 9f3b130 commit 612905e

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

arch/x86/kernel/cpu/mce/core.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,9 +2584,6 @@ static int mce_device_create(unsigned int cpu)
25842584
int err;
25852585
int i, j;
25862586

2587-
if (!mce_available(&boot_cpu_data))
2588-
return -EIO;
2589-
25902587
dev = per_cpu(mce_device, cpu);
25912588
if (dev)
25922589
return 0;

0 commit comments

Comments
 (0)