diff options
author | Naveen Gupta <ngupta@google.com> | 2005-08-21 13:02:41 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2005-09-11 21:53:32 +0200 |
commit | 811f999160487c586917937e95506cb8528472a3 (patch) | |
tree | cc5d555f3ff4581ae83d7fa594b66232dc6c5bd9 /drivers/char | |
parent | [WATCHDOG] i6300esb-set_correct_reload_register_bit (diff) | |
download | linux-811f999160487c586917937e95506cb8528472a3.tar.xz linux-811f999160487c586917937e95506cb8528472a3.zip |
[WATCHDOG] i6300esb.c-pci_dev_put+nowayout-patch
One pci_dev_put was misused (there was one case without putting
the device).
Changed nowayout according to other drivers.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Naveen Gupta <ngupta@google.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/watchdog/i6300esb.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/char/watchdog/i6300esb.c b/drivers/char/watchdog/i6300esb.c index c04b246858ae..823924e4249b 100644 --- a/drivers/char/watchdog/i6300esb.c +++ b/drivers/char/watchdog/i6300esb.c @@ -69,11 +69,7 @@ static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */ module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<heartbeat<2046, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); -#ifdef CONFIG_WATCHDOG_NOWAYOUT -static int nowayout = 1; -#else -static int nowayout = 0; -#endif +static int nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); @@ -368,16 +364,17 @@ static unsigned char __init esb_getdevice (void) * Find the PCI device */ - for_each_pci_dev(dev) + for_each_pci_dev(dev) { if (pci_match_device(esb_pci_tbl, dev)) { esb_pci = dev; break; } + } if (esb_pci) { if (pci_enable_device(esb_pci)) { printk (KERN_ERR PFX "failed to enable device\n"); - goto out; + goto err_devput; } if (pci_request_region(esb_pci, 0, ESB_MODULE_NAME)) { @@ -429,9 +426,9 @@ err_release: pci_release_region(esb_pci, 0); err_disable: pci_disable_device(esb_pci); +err_devput: pci_dev_put(esb_pci); } -out: return 0; } @@ -481,8 +478,8 @@ err_unmap: pci_release_region(esb_pci, 0); /* err_disable: */ pci_disable_device(esb_pci); +/* err_devput: */ pci_dev_put(esb_pci); -/* out: */ return ret; } |