mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 03:06:43 +00:00
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>
This commit is contained in:
parent
1bc608b465
commit
383e8a8230
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user