Skip to content

Commit

Permalink
ACPI: Drop misplaced acpi_dma_deconfigure() call from acpi_bind_one()
Browse files Browse the repository at this point in the history
The acpi_bind_one() error return path can be hit either on physical node
allocation failure or if the device being configured is already
associated with an ACPI node and its ACPI companion does not match the
one acpi_bind_one() is setting it up with. In both cases the error
return path is executed before DMA is configured for a device therefore
there is no need to call acpi_dma_deconfigure() on the function error
return path.

Furthermore, if acpi_bind_one() does configure DMA for a device (ie it
successfully executes acpi_dma_configure()) acpi_bind_one() always
completes execution successfully hence there is no need to add an exit
path to deconfigure the DMA set-up (ie by calling acpi_dma_deconfigure()).

Remove the misplaced acpi_dma_deconfigure() in acpi_bind_one() to
reinstate its correct error return path behaviour.

Fixes: d760a1b (ACPI: Implement acpi_dma_configure)
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lorenzo Pieralisi authored and Rafael J. Wysocki committed Dec 26, 2016
1 parent 7ce7d89 commit 709f94f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/acpi/glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev)
return 0;

err:
acpi_dma_deconfigure(dev);
ACPI_COMPANION_SET(dev, NULL);
put_device(dev);
put_device(&acpi_dev->dev);
Expand Down

0 comments on commit 709f94f

Please sign in to comment.