mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
intel_th: Don't leak module refcount on failure to activate
commit e609ccef52 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b176a6eed3
commit
3076066bb5
@@ -218,8 +218,10 @@ static int intel_th_output_activate(struct intel_th_device *thdev)
|
||||
else
|
||||
intel_th_trace_enable(thdev);
|
||||
|
||||
if (ret)
|
||||
if (ret) {
|
||||
pm_runtime_put(&thdev->dev);
|
||||
module_put(thdrv->driver.owner);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user