Merge "coresight: tmc: skip tmc read if mem allocaiton failed"

This commit is contained in:
Linux Build Service Account 2016-10-25 18:31:06 -07:00 committed by Gerrit - the friendly Code Review server
commit e76e6c8d93

View file

@ -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;