Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Return error values directly where appropri...
details: https://anonhg.NetBSD.org/src/rev/334d3cf1fe48
branches: trunk
changeset: 1007986:334d3cf1fe48
user: fcambus <fcambus%NetBSD.org@localhost>
date: Sat Mar 07 12:31:50 2020 +0000
description:
Return error values directly where appropriate, instead of using the err
variable.
diffstat:
sys/arch/x86/x86/via_padlock.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diffs (40 lines):
diff -r d44a94d1e27a -r 334d3cf1fe48 sys/arch/x86/x86/via_padlock.c
--- a/sys/arch/x86/x86/via_padlock.c Sat Mar 07 07:33:39 2020 +0000
+++ b/sys/arch/x86/x86/via_padlock.c Sat Mar 07 12:31:50 2020 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $ */
-/* $NetBSD: via_padlock.c,v 1.26 2018/07/14 14:46:41 maxv Exp $ */
+/* $NetBSD: via_padlock.c,v 1.27 2020/03/07 12:31:50 fcambus Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
@@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.26 2018/07/14 14:46:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.27 2020/03/07 12:31:50 fcambus Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -372,16 +372,12 @@
uint32_t *key;
int err = 0;
- if ((crd->crd_len % 16) != 0) {
- err = EINVAL;
- return (err);
- }
+ if ((crd->crd_len % 16) != 0)
+ return (EINVAL);
sc->op_buf = malloc(crd->crd_len, M_DEVBUF, M_NOWAIT);
- if (sc->op_buf == NULL) {
- err = ENOMEM;
- return (err);
- }
+ if (sc->op_buf == NULL)
+ return (ENOMEM);
if (crd->crd_flags & CRD_F_ENCRYPT) {
sc->op_cw[0] = ses->ses_cw0 | C3_CRYPT_CWLO_ENCRYPT;
Home |
Main Index |
Thread Index |
Old Index