diff options
author | dann frazier <dannf@hp.com> | 2010-07-28 03:50:49 +0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2010-08-14 00:54:48 +0400 |
commit | 243066bad7e4ff5072b4e67063c4298d5bbba9cd (patch) | |
tree | 3c72f59ae38d9785428f80e17022afa2091e9035 /drivers/watchdog | |
parent | aae67f3602d8869c8ab1b34b6ba9206e9fff4b16 (diff) | |
download | linux-243066bad7e4ff5072b4e67063c4298d5bbba9cd.tar.xz |
watchdog: hpwdt (9/12): hpwdt_pretimeout reorganization
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>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/hpwdt.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 554526cf3233..7ce73170fa37 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -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; } |