mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
crypto: ccree - Use pm_runtime_resume_and_get()
Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle() error handling pattern with pm_runtime_resume_and_get(), which already does this internally. No functional change. Found by manual code inspection. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
e13aea2afb
commit
073e9ea3be
|
|
@ -66,13 +66,7 @@ const struct dev_pm_ops ccree_pm = {
|
|||
|
||||
int cc_pm_get(struct device *dev)
|
||||
{
|
||||
int rc = pm_runtime_get_sync(dev);
|
||||
if (rc < 0) {
|
||||
pm_runtime_put_noidle(dev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return pm_runtime_resume_and_get(dev);
|
||||
}
|
||||
|
||||
void cc_pm_put_suspend(struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user