Merge "coresight: Add Null check before accessing pointer buf"

This commit is contained in:
qctecmdr 2021-08-18 01:05:58 -07:00 • committed by Gerrit - the friendly Code Review server
commit 9b2ccc1d45

View file

@ -237,6 +237,9 @@ static int tmc_enable_etf_sink_perf(struct coresight_device *csdev, void *data)
struct perf_output_handle *handle = data;
struct cs_buffers *buf = etm_perf_sink_config(handle);
if (!buf)
return -EINVAL;
spin_lock_irqsave(&drvdata->spinlock, flags);
do {
ret = -EINVAL;