summaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/idxd/init.c')
-rw-r--r--drivers/dma/idxd/init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
index c19b03c17ab9..6f38128ce400 100644
--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -844,6 +844,10 @@ static int __init idxd_init_module(void)
if (err < 0)
goto err_idxd_driver_register;
+ err = idxd_driver_register(&idxd_dmaengine_drv);
+ if (err < 0)
+ goto err_idxd_dmaengine_driver_register;
+
err = idxd_driver_register(&dsa_drv);
if (err < 0)
goto err_dsa_driver_register;
@@ -863,6 +867,8 @@ err_pci_register:
err_cdev_register:
idxd_driver_unregister(&dsa_drv);
err_dsa_driver_register:
+ idxd_driver_unregister(&idxd_dmaengine_drv);
+err_idxd_dmaengine_driver_register:
idxd_driver_unregister(&idxd_drv);
err_idxd_driver_register:
idxd_unregister_bus_type();
@@ -872,6 +878,7 @@ module_init(idxd_init_module);
static void __exit idxd_exit_module(void)
{
+ idxd_driver_unregister(&idxd_dmaengine_drv);
idxd_driver_unregister(&idxd_drv);
idxd_driver_unregister(&dsa_drv);
pci_unregister_driver(&idxd_pci_driver);