Skip to content

Commit e80d412

Browse files
andy-shevrafaeljw
authored andcommitted
ACPI: scan: Move misleading comment to acpi_dma_configure_id()
The acpi_iommu_configure_id() implementation has a misleading comment since after it the flow does something different to what it states. Move the commit to the caller and with that unshadow the error code inside acpi_iommu_configure_id(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 2649a0f commit e80d412

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/acpi/scan.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,12 +1625,11 @@ static int acpi_iommu_configure_id(struct device *dev, const u32 *id_in)
16251625
if (!err && dev->bus)
16261626
err = iommu_probe_device(dev);
16271627

1628-
/* Ignore all other errors apart from EPROBE_DEFER */
1629-
if (err == -EPROBE_DEFER) {
1628+
if (err == -EPROBE_DEFER)
16301629
return err;
1631-
} else if (err) {
1630+
if (err) {
16321631
dev_dbg(dev, "Adding to IOMMU failed: %d\n", err);
1633-
return -ENODEV;
1632+
return err;
16341633
}
16351634
if (!acpi_iommu_fwspec_ops(dev))
16361635
return -ENODEV;
@@ -1671,13 +1670,14 @@ int acpi_dma_configure_id(struct device *dev, enum dev_dma_attr attr,
16711670

16721671
acpi_arch_dma_setup(dev);
16731672

1673+
/* Ignore all other errors apart from EPROBE_DEFER */
16741674
ret = acpi_iommu_configure_id(dev, input_id);
16751675
if (ret == -EPROBE_DEFER)
16761676
return -EPROBE_DEFER;
16771677

16781678
/*
16791679
* Historically this routine doesn't fail driver probing due to errors
1680-
* in acpi_iommu_configure_id()
1680+
* in acpi_iommu_configure_id().
16811681
*/
16821682

16831683
arch_setup_dma_ops(dev, 0, U64_MAX, attr == DEV_DMA_COHERENT);

0 commit comments

Comments
 (0)