Skip to contentSkip to conversation

dmaengine: acpi: Put the CSRT table after using it

PATCH Applied Hanjun Guo 2 participants 2 messages Jul 22, 2020 – Aug 17, 2020 dmaengine

lore
Share & tools
lore

Hanjun Guo

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/dma/acpi-dma.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/acpi-dma.c +3 -1
index 8a05db3..dcbcb71 100644
@@ -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);
 }
 
 /**
Signature · 1 line
1.7.12.4
maintainer Applied
#1 lore raw
Quoted 3 lines · Hanjun Guo

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.

Applied, thanks

Signature · 1 line
~Vinod