diff options
author | Naveen Gupta <ngupta@google.com> | 2005-08-21 07:02:41 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2005-09-11 15:53:32 -0400 |
commit | 811f999160487c586917937e95506cb8528472a3 (patch) | |
tree | cc5d555f3ff4581ae83d7fa594b66232dc6c5bd9 /drivers/char/watchdog/i6300esb.c | |
parent | ce2f50b4ae71f700c7b4b0bf0ff11c328611dae8 (diff) |
[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/watchdog/i6300esb.c')
-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 */ | |||
69 | module_param(heartbeat, int, 0); | 69 | module_param(heartbeat, int, 0); |
70 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<heartbeat<2046, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); | 70 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<heartbeat<2046, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); |
71 | 71 | ||
72 | #ifdef CONFIG_WATCHDOG_NOWAYOUT | 72 | static int nowayout = WATCHDOG_NOWAYOUT; |
73 | static int nowayout = 1; | ||
74 | #else | ||
75 | static int nowayout = 0; | ||
76 | #endif | ||
77 | module_param(nowayout, int, 0); | 73 | module_param(nowayout, int, 0); |
78 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); | 74 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); |
79 | 75 | ||
@@ -368,16 +364,17 @@ static unsigned char __init esb_getdevice (void) | |||
368 | * Find the PCI device | 364 | * Find the PCI device |
369 | */ | 365 | */ |
370 | 366 | ||
371 | for_each_pci_dev(dev) | 367 | for_each_pci_dev(dev) { |
372 | if (pci_match_device(esb_pci_tbl, dev)) { | 368 | if (pci_match_device(esb_pci_tbl, dev)) { |
373 | esb_pci = dev; | 369 | esb_pci = dev; |
374 | break; | 370 | break; |
375 | } | 371 | } |
372 | } | ||
376 | 373 | ||
377 | if (esb_pci) { | 374 | if (esb_pci) { |
378 | if (pci_enable_device(esb_pci)) { | 375 | if (pci_enable_device(esb_pci)) { |
379 | printk (KERN_ERR PFX "failed to enable device\n"); | 376 | printk (KERN_ERR PFX "failed to enable device\n"); |
380 | goto out; | 377 | goto err_devput; |
381 | } | 378 | } |
382 | 379 | ||
383 | if (pci_request_region(esb_pci, 0, ESB_MODULE_NAME)) { | 380 | if (pci_request_region(esb_pci, 0, ESB_MODULE_NAME)) { |
@@ -429,9 +426,9 @@ err_release: | |||
429 | pci_release_region(esb_pci, 0); | 426 | pci_release_region(esb_pci, 0); |
430 | err_disable: | 427 | err_disable: |
431 | pci_disable_device(esb_pci); | 428 | pci_disable_device(esb_pci); |
429 | err_devput: | ||
432 | pci_dev_put(esb_pci); | 430 | pci_dev_put(esb_pci); |
433 | } | 431 | } |
434 | out: | ||
435 | return 0; | 432 | return 0; |
436 | } | 433 | } |
437 | 434 | ||
@@ -481,8 +478,8 @@ err_unmap: | |||
481 | pci_release_region(esb_pci, 0); | 478 | pci_release_region(esb_pci, 0); |
482 | /* err_disable: */ | 479 | /* err_disable: */ |
483 | pci_disable_device(esb_pci); | 480 | pci_disable_device(esb_pci); |
481 | /* err_devput: */ | ||
484 | pci_dev_put(esb_pci); | 482 | pci_dev_put(esb_pci); |
485 | /* out: */ | ||
486 | return ret; | 483 | return ret; |
487 | } | 484 | } |
488 | 485 | ||