summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/stm/core.c
diff options
context:
space:
mode:
authorTingwei Zhang <tingwei@codeaurora.org>2019-04-17 10:35:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-25 18:26:45 +0200
commit9110fd8ba026471e7d7ee425e812f8c66107ebd4 (patch)
treebc98e9f4143d16e060a804de48abbaeb93bc205e /drivers/hwtracing/stm/core.c
parentbd7df892bb1ccae8e913af3826b2b2e8bb7fb285 (diff)
downloadlinux-stable-9110fd8ba026471e7d7ee425e812f8c66107ebd4.tar.gz
linux-stable-9110fd8ba026471e7d7ee425e812f8c66107ebd4.tar.bz2
linux-stable-9110fd8ba026471e7d7ee425e812f8c66107ebd4.zip
stm class: Fix channel free in stm output free path
commit ee496da4c3915de3232b5f5cd20e21ae3e46fe8d upstream. Number of free masters is not set correctly in stm free path. Fix this by properly adding the number of output channels before setting them to 0 in stm_output_disclaim(). Currently it is equivalent to doing nothing since master->nr_free is incremented by 0. Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices") Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> Cc: stable@vger.kernel.org # v4.4 Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/stm/core.c')
-rw-r--r--drivers/hwtracing/stm/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
index 3c45c1c15f7e..fd0ebec03ae7 100644
--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -226,8 +226,8 @@ stm_output_disclaim(struct stm_device *stm, struct stm_output *output)
bitmap_release_region(&master->chan_map[0], output->channel,
ilog2(output->nr_chans));
- output->nr_chans = 0;
master->nr_free += output->nr_chans;
+ output->nr_chans = 0;
}
/*