Revert "coresight: tmc: sg: Do not leak sg_table"

This reverts commit e8f4164664.
This commit is contained in:
Ksawlii 2024-11-24 00:23:19 +01:00
parent bd94a9b877
commit 9252f7662f

View file

@ -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);
}