From 9252f7662f75f2cf7bcb152f8527d6b38730301e Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:19 +0100 Subject: [PATCH] Revert "coresight: tmc: sg: Do not leak sg_table" This reverts commit e8f416466415d8aca39a55494ac5920920a4f524. --- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 84512d6a1..19e701e0f 100755 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -257,7 +257,6 @@ void tmc_free_sg_table(struct tmc_sg_table *sg_table) { tmc_free_table_pages(sg_table); tmc_free_data_pages(sg_table); - kfree(sg_table); } EXPORT_SYMBOL_GPL(tmc_free_sg_table); @@ -339,6 +338,7 @@ struct tmc_sg_table *tmc_alloc_sg_table(struct device *dev, rc = tmc_alloc_table_pages(sg_table); if (rc) { tmc_free_sg_table(sg_table); + kfree(sg_table); return ERR_PTR(rc); }