watchdog: hpwdt (9/12): hpwdt_pretimeout reorganization
authordann frazier <dannf@hp.com>
Tue, 27 Jul 2010 23:50:49 +0000 (17:50 -0600)
committerWim Van Sebroeck <wim@iguana.be>
Fri, 13 Aug 2010 20:54:48 +0000 (20:54 +0000)
Reorganize this function to remove excess indentation and highlight
the single return code. (No functional change).

Signed-off-by: dann frazier <dannf@hp.com>
Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/hpwdt.c

index 554526cf32336f035a95fd22111a539a7df00652..7ce73170fa37126f336c83af7a2660a4b5c24be8 100644 (file)
@@ -465,24 +465,26 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason,
        static int die_nmi_called;
 
        if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI)
-               return NOTIFY_OK;
-
-       if (hpwdt_nmi_sourcing) {
-               spin_lock_irqsave(&rom_lock, rom_pl);
-               if (!die_nmi_called)
-                       asminline_call(&cmn_regs, cru_rom_addr);
-               die_nmi_called = 1;
-               spin_unlock_irqrestore(&rom_lock, rom_pl);
-               if (cmn_regs.u1.ral == 0) {
-                       printk(KERN_WARNING "hpwdt: An NMI occurred, "
-                               "but unable to determine source.\n");
-               } else {
-                       if (allow_kdump)
-                               hpwdt_stop();
-                       panic("An NMI occurred, please see the Integrated "
-                               "Management Log for details.\n");
-               }
+               goto out;
+
+       if (!hpwdt_nmi_sourcing)
+               goto out;
+
+       spin_lock_irqsave(&rom_lock, rom_pl);
+       if (!die_nmi_called)
+               asminline_call(&cmn_regs, cru_rom_addr);
+       die_nmi_called = 1;
+       spin_unlock_irqrestore(&rom_lock, rom_pl);
+       if (cmn_regs.u1.ral == 0) {
+               printk(KERN_WARNING "hpwdt: An NMI occurred, "
+                       "but unable to determine source.\n");
+       } else {
+               if (allow_kdump)
+                       hpwdt_stop();
+               panic("An NMI occurred, please see the Integrated "
+                       "Management Log for details.\n");
        }
+out:
        return NOTIFY_OK;
 }