stm class: Fix master deallocation in device unregistering
authorChunyan Zhang <zhang.chunyan@linaro.org>
Mon, 15 Feb 2016 17:11:52 +0000 (19:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:09:14 +0000 (14:09 -0800)
commit73a3ed1903f7611f62fb5e1cd3c37afd2908e669
treef454462a7577934ea4b2167e816f9c65c629d9a9
parentf45f40ad65336699757af948b81414c5999f1d48
stm class: Fix master deallocation in device unregistering

The device unregister path uses wrong master index range when it tries
to free the allocated masters, it should, as does the rest of the stm
class code, use real master IDs.

This patch fixes the device unregister path to use real master IDs to
avoid memory leaks after unloading the stm driver.

Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
[alexander.shishkin@intel.com: re-wrote the commit message]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/stm/core.c