summaryrefslogtreecommitdiffstats
path: root/arch/s390/pci/pci_dma.c
diff options
context:
space:
mode:
authorIngo Molnar2016-05-12 09:18:13 +0200
committerIngo Molnar2016-05-12 09:18:13 +0200
commiteb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6 (patch)
tree1b06e2c1beca8f970685eb13096c7a12480526c6 /arch/s390/pci/pci_dma.c
parentsched/core: Fix comment typo in wake_q_add() (diff)
parentRevert "sched/fair: Fix fairness issue on migration" (diff)
downloadkernel-qcow2-linux-eb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6.tar.gz
kernel-qcow2-linux-eb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6.tar.xz
kernel-qcow2-linux-eb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6.zip
Merge branch 'sched/urgent' into sched/core to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/s390/pci/pci_dma.c')
-rw-r--r--arch/s390/pci/pci_dma.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c
index e595e89eac65..1ea8c07eab84 100644
--- a/arch/s390/pci/pci_dma.c
+++ b/arch/s390/pci/pci_dma.c
@@ -457,7 +457,7 @@ int zpci_dma_init_device(struct zpci_dev *zdev)
zdev->dma_table = dma_alloc_cpu_table();
if (!zdev->dma_table) {
rc = -ENOMEM;
- goto out_clean;
+ goto out;
}
/*
@@ -477,18 +477,22 @@ int zpci_dma_init_device(struct zpci_dev *zdev)
zdev->iommu_bitmap = vzalloc(zdev->iommu_pages / 8);
if (!zdev->iommu_bitmap) {
rc = -ENOMEM;
- goto out_reg;
+ goto free_dma_table;
}
rc = zpci_register_ioat(zdev, 0, zdev->start_dma, zdev->end_dma,
(u64) zdev->dma_table);
if (rc)
- goto out_reg;
- return 0;
+ goto free_bitmap;
-out_reg:
+ return 0;
+free_bitmap:
+ vfree(zdev->iommu_bitmap);
+ zdev->iommu_bitmap = NULL;
+free_dma_table:
dma_free_cpu_table(zdev->dma_table);
-out_clean:
+ zdev->dma_table = NULL;
+out:
return rc;
}