diff options
author | Hanjun Guo <guohanjun@huawei.com> | 2020-07-22 12:54:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-17 14:47:45 +0300 |
commit | 444bf09f2be4afd2a73e4c8ae0a8a700e5bbe5fa (patch) | |
tree | fc0b0a84a72e20f39b1f8b95cf4c70cef12020b5 /drivers/dma | |
parent | 89c4339c4d35fa22e355bde1c8b26aa5dbb98e86 (diff) | |
download | linux-444bf09f2be4afd2a73e4c8ae0a8a700e5bbe5fa.tar.xz |
dmaengine: acpi: Put the CSRT table after using it
[ Upstream commit 7eb48dd094de5fe0e216b550e73aa85257903973 ]
The acpi_get_table() should be coupled with acpi_put_table() if
the mapped table is not used at runtime to release the table
mapping, put the CSRT table buf after using it.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/1595411661-15936-1-git-send-email-guohanjun@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/acpi-dma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c index 8a05db3343d3..dcbcb712de6e 100644 --- a/drivers/dma/acpi-dma.c +++ b/drivers/dma/acpi-dma.c @@ -135,11 +135,13 @@ static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma) if (ret < 0) { dev_warn(&adev->dev, "error in parsing resource group\n"); - return; + break; } grp = (struct acpi_csrt_group *)((void *)grp + grp->length); } + + acpi_put_table((struct acpi_table_header *)csrt); } /** |