coresight: perf: Add a missing call to etm_free_aux
authorQuentin Lambert <lambert.quentin@gmail.com>
Tue, 29 Nov 2016 16:47:19 +0000 (09:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2016 19:05:32 +0000 (20:05 +0100)
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>
drivers/hwtracing/coresight/coresight-etm-perf.c

index 5a346fc8ce064413632e1fd82c871562dabb8fae..17741969026e0e23391763d8ce1907729c1184e1 100644 (file)
@@ -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);