Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix a bug that wm_sgmii_readreg_locked() may ret...



details:   https://anonhg.NetBSD.org/src/rev/688f8c70a117
branches:  trunk
changeset: 466012:688f8c70a117
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Dec 09 02:30:30 2019 +0000

description:
Fix a bug that wm_sgmii_readreg_locked() may return error even if error isn't
occured.

diffstat:

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

diffs (27 lines):

diff -r 78ca623da562 -r 688f8c70a117 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon Dec 09 00:15:11 2019 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Dec 09 02:30:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.650 2019/12/04 09:03:45 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.651 2019/12/09 02:30:30 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.650 2019/12/04 09:03:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.651 2019/12/09 02:30:30 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -11626,7 +11626,7 @@
 {
        struct wm_softc *sc = device_private(dev);
        uint32_t i2ccmd;
-       int i, rv;
+       int i, rv = 0;
 
        i2ccmd = (reg << I2CCMD_REG_ADDR_SHIFT)
            | (phy << I2CCMD_PHY_ADDR_SHIFT) | I2CCMD_OPCODE_READ;



Home | Main Index | Thread Index | Old Index