Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci PR kern/52039: use same safeguard as for the 82578
details: https://anonhg.NetBSD.org/src/rev/93bc03e2617a
branches: trunk
changeset: 351968:93bc03e2617a
user: kardel <kardel%NetBSD.org@localhost>
date: Wed Mar 08 08:00:09 2017 +0000
description:
PR kern/52039: use same safeguard as for the 82578
diffstat:
sys/dev/pci/if_wm.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r cbe498c12d89 -r 93bc03e2617a sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Wed Mar 08 07:45:11 2017 +0000
+++ b/sys/dev/pci/if_wm.c Wed Mar 08 08:00:09 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.496 2017/03/03 16:48:55 knakahara Exp $ */
+/* $NetBSD: if_wm.c,v 1.497 2017/03/08 08:00:09 kardel Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.496 2017/03/03 16:48:55 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.497 2017/03/08 08:00:09 kardel Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -13178,7 +13178,7 @@
/* Assume that the PHY is copper */
child = LIST_FIRST(&sc->sc_mii.mii_phys);
- if (child->mii_mpd_rev <= 2)
+ if ((child != NULL) && (child->mii_mpd_rev <= 2))
sc->sc_mii.mii_writereg(sc->sc_dev, 1,
(768 << 5) | 25, 0x0444); /* magic num */
}
Home |
Main Index |
Thread Index |
Old Index