Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/opencrypto crypto(4): Simplify error test in cryptodev_op.
details: https://anonhg.NetBSD.org/src/rev/2b78646db646
branches: trunk
changeset: 366212:2b78646db646
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed May 18 20:03:58 2022 +0000
description:
crypto(4): Simplify error test in cryptodev_op.
No functional change intended.
diffstat:
sys/opencrypto/cryptodev.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diffs (43 lines):
diff -r cd7b54f2379a -r 2b78646db646 sys/opencrypto/cryptodev.c
--- a/sys/opencrypto/cryptodev.c Wed May 18 20:03:45 2022 +0000
+++ b/sys/opencrypto/cryptodev.c Wed May 18 20:03:58 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cryptodev.c,v 1.111 2022/05/18 20:03:45 riastradh Exp $ */
+/* $NetBSD: cryptodev.c,v 1.112 2022/05/18 20:03:58 riastradh Exp $ */
/* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */
/* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.111 2022/05/18 20:03:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.112 2022/05/18 20:03:58 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -647,22 +647,12 @@
error = EINVAL;
goto bail;
}
- crp->crp_mac=cse->tmp_mac;
+ crp->crp_mac = cse->tmp_mac;
}
cv_init(&crp->crp_cv, "crydev");
-
error = crypto_dispatch(crp);
-
- /*
- * Don't touch crp before returned by any error or received
- * cv_signal(&crp->crp_cv). It is required to restructure locks.
- */
-
- switch (error) {
- case 0:
- break;
- default:
+ if (error) {
DPRINTF("not waiting, error.\n");
cv_destroy(&crp->crp_cv);
goto bail;
Home |
Main Index |
Thread Index |
Old Index