Browse Source

coresight: perf: Add a missing call to etm_free_aux

Most error branches following the call to alloc_event_data contain a call
to etm_free_aux. This patch add a call to etm_free_aux to an error branch
that does not call it.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quentin Lambert 8 years ago
parent
commit
ec98960e0b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/hwtracing/coresight/coresight-etm-perf.c

+ 1 - 1
drivers/hwtracing/coresight/coresight-etm-perf.c

@@ -215,7 +215,7 @@ static void *etm_setup_aux(int event_cpu, void **pages,
 	 */
 	sink = coresight_get_enabled_sink(true);
 	if (!sink)
-		return NULL;
+		goto err;
 
 	INIT_WORK(&event_data->work, free_event_data);