coresight tmc etr: Make memory check consistent in the same function
authorMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 9 May 2018 18:06:05 +0000 (12:06 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 14:19:59 +0000 (16:19 +0200)
commit3606a1dcb46eee173203702b6b19cd898afa5d15
tree84a4fe8152e05bdd589ed814a1010c624e06f8e5
parentad0dfdfd874c38d42bc4e5ef8969d86f3da0b93a
coresight tmc etr: Make memory check consistent in the same function

While operating from sysFS the TMC-ETR driver needs to make sure it has
memory to work with but doesn't allocate memory uselessly either.  Since
the main memory handle for this driver is drvdata::vaddr, use it throughout
function tmc_enable_etr_sink_sysfs() so that things are consistent.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc-etr.c