--- zzzz-none-000/linux-3.10.107/drivers/uwb/whci.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/uwb/whci.c 2021-02-04 17:41:59.000000000 +0000 @@ -133,8 +133,7 @@ { struct umc_dev *umc = card->devs[n]; - if (umc != NULL) - umc_device_unregister(umc); + umc_device_unregister(umc); } static int whci_n_caps(struct pci_dev *pci) @@ -175,7 +174,7 @@ err = -ENOMEM; card = kzalloc(sizeof(struct whci_card) - + sizeof(struct whci_dev *) * (n_caps + 1), + + sizeof(struct umc_dev *) * (n_caps + 1), GFP_KERNEL); if (card == NULL) goto error_kzalloc; @@ -253,19 +252,7 @@ .remove = whci_remove, }; -static int __init whci_init(void) -{ - return pci_register_driver(&whci_driver); -} - -static void __exit whci_exit(void) -{ - pci_unregister_driver(&whci_driver); -} - -module_init(whci_init); -module_exit(whci_exit); - +module_pci_driver(whci_driver); MODULE_DESCRIPTION("WHCI UWB Multi-interface Controller enumerator"); MODULE_AUTHOR("Cambridge Silicon Radio Ltd."); MODULE_LICENSE("GPL");