diff options
| author | Tian Tao <[email protected]> | 2021-04-16 01:06:42 +0000 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2021-04-22 07:31:31 +0000 |
| commit | 5d17c414e1029d245d535d10c6ead04dc2f65e15 (patch) | |
| tree | 71ece572f6316ce338e749e7567e4ec71ae535d1 /drivers/crypto/ccp/sp-dev.c | |
| parent | crypto: octeontx2 - add support for OcteonTX2 98xx CPT block. (diff) | |
| download | kernel-5d17c414e1029d245d535d10c6ead04dc2f65e15.tar.gz kernel-5d17c414e1029d245d535d10c6ead04dc2f65e15.zip | |
crypto: ccp - Make ccp_dev_suspend and ccp_dev_resume void functions
Since ccp_dev_suspend() and ccp_dev_resume() only return 0 which causes
ret to equal 0 in sp_suspend and sp_resume, making the if condition
impossible to use. it might be a more appropriate fix to have these be
void functions and eliminate the if condition in sp_suspend() and
sp_resume().
Signed-off-by: Tian Tao <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Tom Lendacky <[email protected]>
Acked-by: Tom Lendacky <[email protected]>
Acked-by: John Allen <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'drivers/crypto/ccp/sp-dev.c')
| -rw-r--r-- | drivers/crypto/ccp/sp-dev.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/crypto/ccp/sp-dev.c b/drivers/crypto/ccp/sp-dev.c index 6284a15e5047..7eb3e4668286 100644 --- a/drivers/crypto/ccp/sp-dev.c +++ b/drivers/crypto/ccp/sp-dev.c @@ -213,12 +213,8 @@ void sp_destroy(struct sp_device *sp) int sp_suspend(struct sp_device *sp) { - int ret; - if (sp->dev_vdata->ccp_vdata) { - ret = ccp_dev_suspend(sp); - if (ret) - return ret; + ccp_dev_suspend(sp); } return 0; @@ -226,12 +222,8 @@ int sp_suspend(struct sp_device *sp) int sp_resume(struct sp_device *sp) { - int ret; - if (sp->dev_vdata->ccp_vdata) { - ret = ccp_dev_resume(sp); - if (ret) - return ret; + ccp_dev_resume(sp); } return 0; |
