stm class: Fix unlocking braino in the error path
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Mon, 15 Feb 2016 17:12:05 +0000 (19:12 +0200)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 1 Jun 2016 21:28:45 +0000 (15:28 -0600)
commit1f6037f5220b05dc3dda8d917d9c57fc29efa0ea
tree4a6079caf5a02ff85152868f8dc4c1f19d3dee24
parent8ffc98078a5ea1acb750ff53c7a935613e201e72
stm class: Fix unlocking braino in the error path

If an illegal attempt is made to unlink stm source device from an
stm device, the stm device's link spinlock mistakenly remains locked.
While this really shouldn't happen (there's a warning in place), the
locking should remain in order so that we can still recover from this
situation if it indeed does happen.

This patch unifies the unlocking in the exit path of
__stm_source_link_drop() to fix this.

Reported-by: Laurent Fert <laurent.fert@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1810f2c44817c74ca3d05d1e3981e3a2e2ceb6f5)
drivers/hwtracing/stm/core.c