perf cs-etm: Refactor error path in cs_etm_decoder__new()
authorMathieu Poirier <mathieu.poirier@linaro.org>
Fri, 24 May 2019 17:34:57 +0000 (11:34 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 10 Jun 2019 18:50:01 +0000 (15:50 -0300)
commit3470d48a4ef30c554934d4a188a97a53656bff57
tree68edb69ae6e4829fd7e5f210c7c7cccbfd655b57
parente0d170fa9a5c6dfc29fb8f900497d8c5ec29c6e7
perf cs-etm: Refactor error path in cs_etm_decoder__new()

There is no point in having two different error goto statement since the
openCSD API to free a decoder handles NULL pointers.  As such function
cs_etm_decoder__free() can be called to deal with all aspect of freeing
decoder memory.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20190524173508.29044-7-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c