summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-10-25 18:31:06 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-25 18:31:06 -0700
commite76e6c8d9389f1123869451b6af46b0b03420d28 (patch)
tree95e4dea7c9bfdf4b61d560f9a50596d67130fe7d /drivers
parent4fc7d493eba7d7cbfda21dd790a7a95828872592 (diff)
parent2b5e9d5cb61478253ad47e999bba205dbce74e92 (diff)
Merge "coresight: tmc: skip tmc read if mem allocaiton failed"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwtracing/coresight/coresight-tmc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c
index 306465ededf9..766b052ade1d 100644
--- a/drivers/hwtracing/coresight/coresight-tmc.c
+++ b/drivers/hwtracing/coresight/coresight-tmc.c
@@ -1143,6 +1143,12 @@ static int tmc_read_prepare(struct tmc_drvdata *drvdata)
goto err;
}
+ if (drvdata->config_type == TMC_CONFIG_TYPE_ETR &&
+ drvdata->vaddr == NULL) {
+ ret = -ENOMEM;
+ goto err;
+ }
+
if (!drvdata->enable)
goto out;