Skip to content

Commit 5f642b4

Browse files
Suzuki K PouloseAlex Shi
authored andcommitted
coresight: Remove erroneous dma_free_coherent in tmc_probe
commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed") removed the static allocation of buffer for the trace data in ETR mode in tmc_probe. However it failed to remove the "devm_free_coherent" in tmc_probe when the probe fails due to other reasons. This patch gets rid of the incorrect dma_free_coherent() call. Fixes: commit de5461970b3e9e194 ("coresight: tmc: allocating memory when needed") Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 481e46fe7a88557b66330cbb047b25cc13eff4b9) Signed-off-by: Alex Shi <alex.shi@linaro.org>
1 parent a877498 commit 5f642b4

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/hwtracing/coresight/coresight-tmc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,6 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
388388
err_misc_register:
389389
coresight_unregister(drvdata->csdev);
390390
err_devm_kzalloc:
391-
if (drvdata->config_type == TMC_CONFIG_TYPE_ETR)
392-
dma_free_coherent(dev, drvdata->size,
393-
drvdata->vaddr, drvdata->paddr);
394391
return ret;
395392
}
396393

0 commit comments

Comments
 (0)