watchdog: Fix print-once on enable
watchdog: Fix print-once on enable

This patch avoids printing the message 'enabled on all CPUs,
...' multiple times. For example, the issue can occur in the
following scenario:

1) watchdog_nmi_enable() fails to enable PMU counters and sets
   cpu0_err.

2) 'echo [0|1] > /proc/sys/kernel/nmi_watchdog' is executed to
   disable and re-enable the watchdog mechanism 'on the fly'.

3) If watchdog_nmi_enable() succeeds to enable PMU counters,
   each CPU will print the message because step1 left behind a
   non-zero cpu0_err.

   if (!IS_ERR(event)) {
       if (cpu == 0 || cpu0_err)
           pr_info("enabled on all CPUs, ...")

The patch avoids this by clearing cpu0_err in watchdog_nmi_disable().

Signed-off-by: Ulrich Obergfell <2f076acc3232878642c0aa405d54beec6cc1a760@redhat.com>
Signed-off-by: Andrew Jones <20ca6a98b2289e315ee985b8cb9cb36522e95d55@redhat.com>
Signed-off-by: Don Zickus <3c9a8cec2f33672bf03519b05ce2324e6cf5717a@redhat.com>
Cc: 69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com
Link: http://lkml.kernel.org/r/1407768567-171794-4-git-send-email-3c9a8cec2f33672bf03519b05ce2324e6cf5717a@redhat.com
[ Applied small cleanups. ]
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs