summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2020-01-16 13:14:40 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-01-22 11:21:10 +0300
commitcedca59fae5834af8445b403c66c9953754375d7 (patch)
treea2cf6dab2d25385db8ec47d0361d56befca15209 /drivers
parentc7b31c88da242153b3c2a2afe8486ae5c5f36556 (diff)
downloadlinux-cedca59fae5834af8445b403c66c9953754375d7.tar.xz
crypto: ccree - fix pm wrongful error reporting
pm_runtime_get_sync() can return 1 as a valid (none error) return code. Treat it as such. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/ccree/cc_pm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c
index 4de25c85d127..79c612144310 100644
--- a/drivers/crypto/ccree/cc_pm.c
+++ b/drivers/crypto/ccree/cc_pm.c
@@ -85,7 +85,7 @@ int cc_pm_get(struct device *dev)
else
pm_runtime_get_noresume(dev);
- return rc;
+ return (rc == 1 ? 0 : rc);
}
int cc_pm_put_suspend(struct device *dev)