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)");
* 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)) {
pci_release_region(esb_pci, 0);
err_disable:
pci_disable_device(esb_pci);
+err_devput:
pci_dev_put(esb_pci);
}
-out:
return 0;
}
pci_release_region(esb_pci, 0);
/* err_disable: */
pci_disable_device(esb_pci);
+/* err_devput: */
pci_dev_put(esb_pci);
-/* out: */
return ret;
}