Merge "coresight: tmc: etf: Free its buffer and set NULL when etf can't be enabled"
This commit is contained in:
commit
f19948a686
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user