Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci When sc->phy.acquire() failed, it's not required...



details:   https://anonhg.NetBSD.org/src/rev/91cb005dc5ba
branches:  trunk
changeset: 995352:91cb005dc5ba
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Dec 17 04:21:44 2018 +0000

description:
When sc->phy.acquire() failed, it's not required to call sc->phy.release().

diffstat:

 sys/dev/pci/if_wm.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r f178be3af1ae -r 91cb005dc5ba sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon Dec 17 04:14:40 2018 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Dec 17 04:21:44 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.606 2018/12/17 04:14:40 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.607 2018/12/17 04:21:44 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.606 2018/12/17 04:14:40 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.607 2018/12/17 04:21:44 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -14192,7 +14192,7 @@
        if (rv != 0) {
                DPRINTF(WM_DEBUG_INIT, ("%s: %s: failed\n",
                device_xname(sc->sc_dev), __func__));
-               goto release;
+               return -1;
        }
 
        /* Toggle LANPHYPC */
@@ -14428,7 +14428,7 @@
                uint16_t phy_reg;
 
                if (sc->phy.acquire(sc) != 0)
-                       goto release;
+                       return -1;
 
                /* Clear Auto Enable LPI after link up */
                sc->phy.readreg_locked(dev, 1, I217_LPI_GPIO_CTRL, &phy_reg);



Home | Main Index | Thread Index | Old Index