Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci hifn(4): Fix error branches to do crypto_done, n...



details:   https://anonhg.NetBSD.org/src/rev/f044bf58acf5
branches:  trunk
changeset: 366315:f044bf58acf5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 22 11:31:25 2022 +0000

description:
hifn(4): Fix error branches to do crypto_done, not return error.

diffstat:

 sys/dev/pci/hifn7751.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r fba64611f8b4 -r f044bf58acf5 sys/dev/pci/hifn7751.c
--- a/sys/dev/pci/hifn7751.c    Sun May 22 11:30:58 2022 +0000
+++ b/sys/dev/pci/hifn7751.c    Sun May 22 11:31:25 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hifn7751.c,v 1.74 2020/05/17 16:01:06 riastradh Exp $  */
+/*     $NetBSD: hifn7751.c,v 1.75 2022/05/22 11:31:25 riastradh Exp $  */
 /*     $OpenBSD: hifn7751.c,v 1.179 2020/01/11 21:34:03 cheloha Exp $  */
 
 /*
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.74 2020/05/17 16:01:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.75 2022/05/22 11:31:25 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/cprng.h>
@@ -2184,7 +2184,8 @@
 
        if ((cmd = pool_cache_get(sc->sc_cmd_cache, PR_NOWAIT)) == NULL) {
                hifnstats.hst_nomem++;
-               return (ENOMEM);
+               err = ENOMEM;
+               goto errout;
        }
 
        mutex_spin_enter(&sc->sc_mtx);
@@ -2631,7 +2632,7 @@
                 * XXX dynamically resize them.
                 */
                err = EINVAL;
-               return (ENOMEM);
+               goto fail;
        }
 
        if ((crd->crd_flags & CRD_F_COMP) == 0)



Home | Main Index | Thread Index | Old Index