Merge "coresight: tmc: etf: Free its buffer and set NULL when etf can't be enabled"

This commit is contained in:
QCTECMDR Service 2024-08-13 08:27:42 -07:00 committed by Gerrit - the friendly Code Review server
commit f19948a686

View File

@ -247,7 +247,8 @@ static int tmc_enable_etf_sink_sysfs(struct coresight_device *csdev)
atomic_inc(csdev->refcnt);
} else {
/* Free up the buffer if we failed to enable */
used = false;
kfree(drvdata->buf);
drvdata->buf = NULL;
}
out:
spin_unlock_irqrestore(&drvdata->spinlock, flags);