Skip to content

Commit

Permalink
powerpc/dart: remove dead cleanup code in iommu_init_early_dart
Browse files Browse the repository at this point in the history
If dart_init failed we didn't have a chance to setup dma or controller
ops yet, so there is no point in resetting them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Christoph Hellwig authored and Michael Ellerman committed Feb 18, 2019
1 parent ba767b5 commit ee69049
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions arch/powerpc/sysdev/dart_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void __init iommu_init_early_dart(struct pci_controller_ops *controller_ops)

/* Initialize the DART HW */
if (dart_init(dn) != 0)
goto bail;
return;

/* Setup bypass if supported */
if (dart_is_u4)
Expand All @@ -439,15 +439,6 @@ void __init iommu_init_early_dart(struct pci_controller_ops *controller_ops)

/* Setup pci_dma ops */
set_pci_dma_ops(&dma_iommu_ops);
return;

bail:
/* If init failed, use direct iommu and null setup functions */
controller_ops->dma_dev_setup = NULL;
controller_ops->dma_bus_setup = NULL;

/* Setup pci_dma ops */
set_pci_dma_ops(&dma_nommu_ops);
}

#ifdef CONFIG_PM
Expand Down

0 comments on commit ee69049

Please sign in to comment.