summaryrefslogtreecommitdiff
path: root/drivers/soc/ti/knav_qmss_queue.c
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2020-11-22 06:22:00 +0300
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>2020-11-22 06:22:00 +0300
commitec8684847d8062496c4619bc3fcff31c19d56847 (patch)
treee84dfb8b987c00d37af065136fb5538f9217f3ea /drivers/soc/ti/knav_qmss_queue.c
parente643bd3809d4763cb85950782508f9a1ae78a8ac (diff)
downloadlinux-ec8684847d8062496c4619bc3fcff31c19d56847.tar.xz
soc: ti: knav_qmss: fix reference leak in knav_queue_probe
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in knav_queue_probe, so we should fix it. Fixes: 41f93af900a20 ("soc: ti: add Keystone Navigator QMSS driver") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Diffstat (limited to 'drivers/soc/ti/knav_qmss_queue.c')
-rw-r--r--drivers/soc/ti/knav_qmss_queue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index a460f201bf8e..54afa8f7f408 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1784,6 +1784,7 @@ static int knav_queue_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0) {
+ pm_runtime_put_noidle(&pdev->dev);
dev_err(dev, "Failed to enable QMSS\n");
return ret;
}