linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: acpi: Put the CSRT table after using it
@ 2020-07-22  9:54 Hanjun Guo
  2020-08-17  4:51 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Hanjun Guo @ 2020-07-22  9:54 UTC (permalink / raw)
  To: Dan Williams, Vinod Koul; +Cc: dmaengine, linux-kernel, 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.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
 drivers/dma/acpi-dma.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c
index 8a05db3..dcbcb71 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);
 }
 
 /**
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: acpi: Put the CSRT table after using it
  2020-07-22  9:54 [PATCH] dmaengine: acpi: Put the CSRT table after using it Hanjun Guo
@ 2020-08-17  4:51 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-08-17  4:51 UTC (permalink / raw)
  To: Hanjun Guo; +Cc: Dan Williams, dmaengine, linux-kernel

On 22-07-20, 17:54, Hanjun Guo wrote:
> 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

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-17  4:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22  9:54 [PATCH] dmaengine: acpi: Put the CSRT table after using it Hanjun Guo
2020-08-17  4:51 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).