Explorar o código

x86: watchdog - check for CPU is being supported

This patch does check if CPU is being recongnized
before call the unreserve(). Since enable_lapic_nmi_watchdog()
does have such a check the same is make sense here too
in a sake of code consistency (but nothing more).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: mingo@redhat.com
Cc: hpa@zytor.com
Cc: macro@linux-mips.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cyrill Gorcunov %!s(int64=17) %!d(string=hai) anos
pai
achega
1a1b1d1322
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      arch/x86/kernel/cpu/perfctr-watchdog.c

+ 3 - 1
arch/x86/kernel/cpu/perfctr-watchdog.c

@@ -181,7 +181,9 @@ void disable_lapic_nmi_watchdog(void)
 		return;
 
 	on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1);
-	wd_ops->unreserve();
+
+	if (wd_ops)
+		wd_ops->unreserve();
 
 	BUG_ON(atomic_read(&nmi_active) != 0);
 }