static int __init ath9k_init(void) { int error; /* Register rate control algorithm */ error = ath_rate_control_register(); if (error != 0) { pr_err("Unable to register rate control algorithm: %d\n", error); goto err_out; } error = ath_pci_init(); if (error < 0) { pr_err("No PCI devices found, driver not installed\n"); error = -ENODEV; goto err_rate_unregister; } error = ath_ahb_init(); if (error < 0) { error = -ENODEV; goto err_pci_exit; } return 0; err_pci_exit: ath_pci_exit(); err_rate_unregister: ath_rate_control_unregister(); err_out: return error; }
static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); pr_info("%s: Driver unloaded\n", dev_info); }
static int __init ath9k_init(void) { int error; error = ath_pci_init(); if (error < 0) { pr_err("No PCI devices found, driver not installed\n"); error = -ENODEV; goto err_out; } error = ath_ahb_init(); if (error < 0) { error = -ENODEV; goto err_pci_exit; } dmi_check_system(ath9k_quirks); return 0; err_pci_exit: ath_pci_exit(); err_out: return error; }
static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); ath_rate_control_unregister(); pr_info("%s: Driver unloaded\n", dev_info); }
static void __exit ath9k_exit(void) { ath_ahb_exit(); ath_pci_exit(); ath9k_debug_remove_root(); ath_rate_control_unregister(); printk(KERN_INFO "%s: Driver unloaded\n", dev_info); }
static int __init ath9k_init(void) { int error; /* Register rate control algorithm */ error = ath_rate_control_register(); if (error != 0) { printk(KERN_ERR "ath9k: Unable to register rate control " "algorithm: %d\n", error); goto err_out; } error = ath9k_debug_create_root(); if (error) { printk(KERN_ERR "ath9k: Unable to create debugfs root: %d\n", error); goto err_rate_unregister; } error = ath_pci_init(); if (error < 0) { printk(KERN_ERR "ath9k: No PCI devices found, driver not installed.\n"); error = -ENODEV; goto err_remove_root; } error = ath_ahb_init(); if (error < 0) { error = -ENODEV; goto err_pci_exit; } return 0; err_pci_exit: ath_pci_exit(); err_remove_root: ath9k_debug_remove_root(); err_rate_unregister: ath_rate_control_unregister(); err_out: return error; }