]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ACPI: Drop misplaced acpi_dma_deconfigure() call from acpi_bind_one()
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 16 Dec 2016 14:43:56 +0000 (14:43 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 Dec 2016 22:15:36 +0000 (23:15 +0100)
commit709f94ff018a4403d0bb32643254058d5d9cfa24
tree790645f2dbc90ccb207ba09db7db517babadeef0
parent7ce7d89f48834cefece7804d38fc5d85382edf77
ACPI: Drop misplaced acpi_dma_deconfigure() call from acpi_bind_one()

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: d760a1baf20e (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>
drivers/acpi/glue.c