Skip to content
Commit b7b57a56 authored by dinghao.liu@zju.edu.cn's avatar dinghao.liu@zju.edu.cn Committed by Herbert Xu
Browse files

crypto: ccree - fix runtime PM imbalance on error

pm_runtime_get_sync() increments the runtime PM usage counter
even when it returns an error code. However, users of cc_pm_get(),
a direct wrapper of pm_runtime_get_sync(), assume that PM usage
counter will not change on error. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.

Fixes: 8c7849a3

 ("crypto: ccree - simplify Runtime PM handling")
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 39340cf9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment