intel_th: Don't leak module refcount on failure to activate
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 24 Feb 2017 14:04:15 +0000 (16:04 +0200)
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>
Wed, 15 Mar 2017 12:54:57 +0000 (14:54 +0200)
commite609ccef5222c73b46b322be7d3796d60bff353d
tree3f96ebd7672d7571b7b7c014f169ef6124ecfad2
parent4495c08e84729385774601b5146d51d9e5849f81
intel_th: Don't leak module refcount on failure to activate

Output 'activation' may fail for the reasons of the output driver,
for example, if msc's buffer is not allocated. We forget, however,
to drop the module reference in this case. So each attempt at
activation in this case leaks a reference, preventing the module
from ever unloading.

This patch adds the missing module_put() in the activation error
path.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: stable@vger.kernel.org # v4.8+
drivers/hwtracing/intel_th/core.c