diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2000-04-28 05:25:40 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2000-04-28 05:25:40 +0000 |
commit | efca6bf60810e6b82c761bacac198f4979b35b39 (patch) | |
tree | fd51d158f716bdd6182a59a7c8e26739bf03732a /sys/crypto/crypto.c | |
parent | 38525483073769f0ba9b605a0ab8251a81960cc4 (diff) |
crypto_dispatch() only returns an error if the argument it was
provided was NULL or no callback was specified.
Diffstat (limited to 'sys/crypto/crypto.c')
-rw-r--r-- | sys/crypto/crypto.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c index fa7dea72bbd..890a15c65dc 100644 --- a/sys/crypto/crypto.c +++ b/sys/crypto/crypto.c @@ -289,7 +289,8 @@ crypto_dispatch(struct cryptop *crp) if ((crp->crp_desc == NULL) || (crypto_drivers == NULL)) { crp->crp_etype = EINVAL; - return crp->crp_callback(crp); + crp->crp_callback(crp); + return 0; } hid = (crp->crp_sid >> 31) & 0xffffffff; @@ -304,7 +305,8 @@ crypto_dispatch(struct cryptop *crp) crp->crp_sid = nid; crp->crp_etype = EAGAIN; - return crp->crp_callback(crp); + crp->crp_callback(crp); + return 0; } if (crypto_drivers[hid].cc_flags & CRYPTOCAP_F_CLEANUP) @@ -320,10 +322,12 @@ crypto_dispatch(struct cryptop *crp) crp->crp_sid = nid; crp->crp_etype = EAGAIN; - return crp->crp_callback(crp); + crp->crp_callback(crp); + return 0; } - return crypto_drivers[hid].cc_process(crp); + crypto_drivers[hid].cc_process(crp); + return 0; } /* |