Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: acpi: Put the CSRT table after using it

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>

authored by

Hanjun Guo and committed by
Vinod Koul
7eb48dd0 9123e3a7

+3 -1
+3 -1
drivers/dma/acpi-dma.c
··· 135 135 if (ret < 0) { 136 136 dev_warn(&adev->dev, 137 137 "error in parsing resource group\n"); 138 - return; 138 + break; 139 139 } 140 140 141 141 grp = (struct acpi_csrt_group *)((void *)grp + grp->length); 142 142 } 143 + 144 + acpi_put_table((struct acpi_table_header *)csrt); 143 145 } 144 146 145 147 /**