Revert "coresight: tmc: sg: Do not leak sg_table"
This reverts commit e8f4164664
.
This commit is contained in:
parent
bd94a9b877
commit
9252f7662f
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,6 @@ void tmc_free_sg_table(struct tmc_sg_table *sg_table)
|
||||||
{
|
{
|
||||||
tmc_free_table_pages(sg_table);
|
tmc_free_table_pages(sg_table);
|
||||||
tmc_free_data_pages(sg_table);
|
tmc_free_data_pages(sg_table);
|
||||||
kfree(sg_table);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(tmc_free_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);
|
rc = tmc_alloc_table_pages(sg_table);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
tmc_free_sg_table(sg_table);
|
tmc_free_sg_table(sg_table);
|
||||||
|
kfree(sg_table);
|
||||||
return ERR_PTR(rc);
|
return ERR_PTR(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue