diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2020-10-16 17:05:36 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-10-30 17:35:02 +1100 |
commit | 383e8a823014532ffd81c787ef9009f1c2bd3b79 (patch) | |
tree | 31d3740a6d4e4e415c1a34d43dfdd454064f1785 /drivers/crypto | |
parent | 1bc608b4655b8b1491fb100f4cf4f15ae64a8698 (diff) |
crypto: omap-aes - fix the reference count leak of omap device
pm_runtime_get_sync() will increment pm usage counter even
when it returns an error code. We should call put operation
in error handling paths of omap_aes_hw_init.
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/omap-aes.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index 4fd14d90cc40..70ea5784a024 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -105,6 +105,7 @@ static int omap_aes_hw_init(struct omap_aes_dev *dd) err = pm_runtime_get_sync(dd->dev); if (err < 0) { + pm_runtime_put_noidle(dd->dev); dev_err(dd->dev, "failed to get sync: %d\n", err); return err; } |