Commit 612905e1 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by Borislav Petkov (AMD)

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: default avatarNikolay Borisov <nik.borisov@suse.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231107165529.407349-1-nik.borisov@suse.com
parent 9f3b1300
...@@ -2584,9 +2584,6 @@ static int mce_device_create(unsigned int cpu) ...@@ -2584,9 +2584,6 @@ static int mce_device_create(unsigned int cpu)
int err; int err;
int i, j; int i, j;
if (!mce_available(&boot_cpu_data))
return -EIO;
dev = per_cpu(mce_device, cpu); dev = per_cpu(mce_device, cpu);
if (dev) if (dev)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment