summaryrefslogtreecommitdiff
path: root/sys/dev/pci/hifn7751.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-08-22 16:11:32 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-08-22 16:11:32 +0000
commitf54ad8318a7799796cd40fb5564f5bf730fa21db (patch)
tree1ddb9dc63327ded25e790371218c9ead93343894 /sys/dev/pci/hifn7751.c
parent90d4e6868d6eb865777854c63d67aa88dbb42973 (diff)
better error handling (a merge of ben's stuff and mine)
Diffstat (limited to 'sys/dev/pci/hifn7751.c')
-rw-r--r--sys/dev/pci/hifn7751.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c
index 709066a95b4..b9e68f0107c 100644
--- a/sys/dev/pci/hifn7751.c
+++ b/sys/dev/pci/hifn7751.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751.c,v 1.95 2001/08/22 05:15:25 jason Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.96 2001/08/22 16:11:31 jason Exp $ */
/*
* Invertex AEON / Hifn 7751 driver
@@ -1702,8 +1702,6 @@ hifn_process(crp)
if ((enccrd->crd_flags & CRD_F_ENCRYPT)
!= sc->sc_sessions[session].hs_prev_op)
sc->sc_sessions[session].hs_flags=1;
- sc->sc_sessions[session].hs_prev_op=enccrd->crd_flags
- & CRD_F_ENCRYPT;
break;
case CRYPTO_DES_CBC:
cmd->cry_masks |= HIFN_CRYPT_CMD_ALG_DES |
@@ -1781,16 +1779,18 @@ hifn_process(crp)
}
}
- if (sc->sc_sessions[session].hs_flags == 1)
- sc->sc_sessions[session].hs_flags = 2;
-
cmd->crp = crp;
cmd->session_num = session;
cmd->softc = sc;
err = hifn_crypto(sc, cmd, crp);
- if (err == 0)
- return (err);
+ if (!err) {
+ sc->sc_sessions[session].hs_prev_op=enccrd->crd_flags
+ & CRD_F_ENCRYPT;
+ if (sc->sc_sessions[session].hs_flags == 1)
+ sc->sc_sessions[session].hs_flags = 2;
+ return 0;
+ }
errout:
if (cmd != NULL)