mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
crypto: sa2ul - Fix PM reference leak in sa_ul_probe()
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu <liushixin2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
747bf30fd9
commit
13343badae
@ -2354,7 +2354,7 @@ static int sa_ul_probe(struct platform_device *pdev)
|
||||
dev_set_drvdata(sa_k3_dev, dev_data);
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "%s: failed to get sync: %d\n", __func__,
|
||||
ret);
|
||||
|
Loading…
Reference in New Issue
Block a user