summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-09-09 12:45:28 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-09-18 17:20:10 +1000
commit2baace5feb86c6916221911f391f11fcd8e1a259 (patch)
tree31560881ebf8d7180ab0a4d4c9d087c2b80cf7e6 /drivers/crypto
parentbd03b0214ad426c078d46c2b54a3b14f81b97f6b (diff)
downloadlinux-2baace5feb86c6916221911f391f11fcd8e1a259.tar.gz
linux-2baace5feb86c6916221911f391f11fcd8e1a259.tar.bz2
linux-2baace5feb86c6916221911f391f11fcd8e1a259.zip
crypto: sa2ul - Fix pm_runtime_get_sync() error checking
The pm_runtime_get_sync() function returns either 0 or 1 on success but this code treats a return of 1 as a failure. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/sa2ul.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
index 934e9a00638c..a0b398ac6723 100644
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -2327,7 +2327,7 @@ static int sa_ul_probe(struct platform_device *pdev)
pm_runtime_enable(dev);
ret = pm_runtime_get_sync(dev);
- if (ret) {
+ if (ret < 0) {
dev_err(&pdev->dev, "%s: failed to get sync: %d\n", __func__,
ret);
return ret;