coresight: Remove erroneous dma_free_coherent in tmc_probe
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 25 Aug 2016 21:18:54 +0000 (15:18 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 11:05:42 +0000 (13:05 +0200)
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>
drivers/hwtracing/coresight/coresight-tmc.c

index 9e02ac963cd0e3fbb38f9ee5e3fd082719f38bf7..3978cbb6b038c814ff839f084b157560ae1e68dc 100644 (file)
@@ -388,9 +388,6 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
 err_misc_register:
        coresight_unregister(drvdata->csdev);
 err_devm_kzalloc:
-       if (drvdata->config_type == TMC_CONFIG_TYPE_ETR)
-               dma_free_coherent(dev, drvdata->size,
-                               drvdata->vaddr, drvdata->paddr);
        return ret;
 }