diff options
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-tmc-etr.c')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-tmc-etr.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 847d1b5f2c13..688be9e060fc 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c | |||
@@ -300,13 +300,10 @@ int tmc_read_unprepare_etr(struct tmc_drvdata *drvdata) | |||
300 | if (local_read(&drvdata->mode) == CS_MODE_SYSFS) { | 300 | if (local_read(&drvdata->mode) == CS_MODE_SYSFS) { |
301 | /* | 301 | /* |
302 | * The trace run will continue with the same allocated trace | 302 | * The trace run will continue with the same allocated trace |
303 | * buffer. As such zero-out the buffer so that we don't end | 303 | * buffer. The trace buffer is cleared in tmc_etr_enable_hw(), |
304 | * up with stale data. | 304 | * so we don't have to explicitly clear it. Also, since the |
305 | * | 305 | * tracer is still enabled drvdata::buf can't be NULL. |
306 | * Since the tracer is still enabled drvdata::buf | ||
307 | * can't be NULL. | ||
308 | */ | 306 | */ |
309 | memset(drvdata->buf, 0, drvdata->size); | ||
310 | tmc_etr_enable_hw(drvdata); | 307 | tmc_etr_enable_hw(drvdata); |
311 | } else { | 308 | } else { |
312 | /* | 309 | /* |
@@ -315,7 +312,7 @@ int tmc_read_unprepare_etr(struct tmc_drvdata *drvdata) | |||
315 | */ | 312 | */ |
316 | vaddr = drvdata->vaddr; | 313 | vaddr = drvdata->vaddr; |
317 | paddr = drvdata->paddr; | 314 | paddr = drvdata->paddr; |
318 | drvdata->buf = NULL; | 315 | drvdata->buf = drvdata->vaddr = NULL; |
319 | } | 316 | } |
320 | 317 | ||
321 | drvdata->reading = false; | 318 | drvdata->reading = false; |