aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/intel_mid_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/intel_mid_dma.c')
-rw-r--r--drivers/dma/intel_mid_dma.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index 338bc4eed1f3..3109bd94bc4f 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -1075,7 +1075,6 @@ static int mid_setup_dma(struct pci_dev *pdev)
1075 if (NULL == dma->dma_pool) { 1075 if (NULL == dma->dma_pool) {
1076 pr_err("ERR_MDMA:pci_pool_create failed\n"); 1076 pr_err("ERR_MDMA:pci_pool_create failed\n");
1077 err = -ENOMEM; 1077 err = -ENOMEM;
1078 kfree(dma);
1079 goto err_dma_pool; 1078 goto err_dma_pool;
1080 } 1079 }
1081 1080
@@ -1186,7 +1185,6 @@ err_engine:
1186 free_irq(pdev->irq, dma); 1185 free_irq(pdev->irq, dma);
1187err_irq: 1186err_irq:
1188 pci_pool_destroy(dma->dma_pool); 1187 pci_pool_destroy(dma->dma_pool);
1189 kfree(dma);
1190err_dma_pool: 1188err_dma_pool:
1191 pr_err("ERR_MDMA:setup_dma failed: %d\n", err); 1189 pr_err("ERR_MDMA:setup_dma failed: %d\n", err);
1192 return err; 1190 return err;
@@ -1413,7 +1411,7 @@ static const struct dev_pm_ops intel_mid_dma_pm = {
1413 .runtime_idle = dma_runtime_idle, 1411 .runtime_idle = dma_runtime_idle,
1414}; 1412};
1415 1413
1416static struct pci_driver intel_mid_dma_pci = { 1414static struct pci_driver intel_mid_dma_pci_driver = {
1417 .name = "Intel MID DMA", 1415 .name = "Intel MID DMA",
1418 .id_table = intel_mid_dma_ids, 1416 .id_table = intel_mid_dma_ids,
1419 .probe = intel_mid_dma_probe, 1417 .probe = intel_mid_dma_probe,
@@ -1431,13 +1429,13 @@ static int __init intel_mid_dma_init(void)
1431{ 1429{
1432 pr_debug("INFO_MDMA: LNW DMA Driver Version %s\n", 1430 pr_debug("INFO_MDMA: LNW DMA Driver Version %s\n",
1433 INTEL_MID_DMA_DRIVER_VERSION); 1431 INTEL_MID_DMA_DRIVER_VERSION);
1434 return pci_register_driver(&intel_mid_dma_pci); 1432 return pci_register_driver(&intel_mid_dma_pci_driver);
1435} 1433}
1436fs_initcall(intel_mid_dma_init); 1434fs_initcall(intel_mid_dma_init);
1437 1435
1438static void __exit intel_mid_dma_exit(void) 1436static void __exit intel_mid_dma_exit(void)
1439{ 1437{
1440 pci_unregister_driver(&intel_mid_dma_pci); 1438 pci_unregister_driver(&intel_mid_dma_pci_driver);
1441} 1439}
1442module_exit(intel_mid_dma_exit); 1440module_exit(intel_mid_dma_exit);
1443 1441