init.c (5fee6567ec387088ec965ee60c63051bbe102cac) | init.c (034b3290ba257f1a3c8730f3fba72e11645e7b50) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/slab.h> 7#include <linux/pci.h> 8#include <linux/interrupt.h> --- 826 unchanged lines hidden (view full) --- 835 support_enqcmd = true; 836 837 perfmon_init(); 838 839 err = idxd_register_bus_type(); 840 if (err < 0) 841 return err; 842 | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/slab.h> 7#include <linux/pci.h> 8#include <linux/interrupt.h> --- 826 unchanged lines hidden (view full) --- 835 support_enqcmd = true; 836 837 perfmon_init(); 838 839 err = idxd_register_bus_type(); 840 if (err < 0) 841 return err; 842 |
843 err = idxd_driver_register(&idxd_drv); 844 if (err < 0) 845 goto err_idxd_driver_register; 846 |
|
843 err = idxd_driver_register(&dsa_drv); 844 if (err < 0) 845 goto err_dsa_driver_register; 846 847 err = idxd_cdev_register(); 848 if (err) 849 goto err_cdev_register; 850 851 err = pci_register_driver(&idxd_pci_driver); 852 if (err) 853 goto err_pci_register; 854 855 return 0; 856 857err_pci_register: 858 idxd_cdev_remove(); 859err_cdev_register: 860 idxd_driver_unregister(&dsa_drv); 861err_dsa_driver_register: | 847 err = idxd_driver_register(&dsa_drv); 848 if (err < 0) 849 goto err_dsa_driver_register; 850 851 err = idxd_cdev_register(); 852 if (err) 853 goto err_cdev_register; 854 855 err = pci_register_driver(&idxd_pci_driver); 856 if (err) 857 goto err_pci_register; 858 859 return 0; 860 861err_pci_register: 862 idxd_cdev_remove(); 863err_cdev_register: 864 idxd_driver_unregister(&dsa_drv); 865err_dsa_driver_register: |
866 idxd_driver_unregister(&idxd_drv); 867err_idxd_driver_register: |
|
862 idxd_unregister_bus_type(); 863 return err; 864} 865module_init(idxd_init_module); 866 867static void __exit idxd_exit_module(void) 868{ | 868 idxd_unregister_bus_type(); 869 return err; 870} 871module_init(idxd_init_module); 872 873static void __exit idxd_exit_module(void) 874{ |
875 idxd_driver_unregister(&idxd_drv); |
|
869 idxd_driver_unregister(&dsa_drv); 870 pci_unregister_driver(&idxd_pci_driver); 871 idxd_cdev_remove(); 872 idxd_unregister_bus_type(); 873 perfmon_exit(); 874} 875module_exit(idxd_exit_module); 876 --- 22 unchanged lines hidden --- | 876 idxd_driver_unregister(&dsa_drv); 877 pci_unregister_driver(&idxd_pci_driver); 878 idxd_cdev_remove(); 879 idxd_unregister_bus_type(); 880 perfmon_exit(); 881} 882module_exit(idxd_exit_module); 883 --- 22 unchanged lines hidden --- |