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 error check. reported by David Binderman in ...



details:   https://anonhg.NetBSD.org/src/rev/6ccbb015181d
branches:  trunk
changeset: 995716:6ccbb015181d
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jan 03 08:46:03 2019 +0000

description:
Fix error check. reported by David Binderman in kern/53821.

diffstat:

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

diffs (28 lines):

diff -r 0f1421ed2449 -r 6ccbb015181d sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Jan 03 08:02:49 2019 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Jan 03 08:46:03 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.612 2018/12/30 04:18:09 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.613 2019/01/03 08:46:03 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.612 2018/12/30 04:18:09 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.613 2019/01/03 08:46:03 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -14636,7 +14636,8 @@
                        /* Restore clear on SMB if no manageability engine
                         * is present
                         */
-                       sc->phy.readreg_locked(dev, 1, I217_MEMPWR, &phy_reg);
+                       rv = sc->phy.readreg_locked(dev, 1, I217_MEMPWR,
+                           &phy_reg);
                        if (rv != 0)
                                goto release;
                        phy_reg |= I217_MEMPWR_DISABLE_SMB_RELEASE;



Home | Main Index | Thread Index | Old Index