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

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
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2584,9 +2584,6 @@ static int mce_device_create(unsigned int cpu)
	int err;
	int i, j;

	if (!mce_available(&boot_cpu_data))
		return -EIO;

	dev = per_cpu(mce_device, cpu);
	if (dev)
		return 0;