Module Name: src
Committed By: msaitoh
Date: Mon Aug 8 07:49:18 UTC 2022
Modified Files:
src/sys/dev/pci: if_wm.c
Log Message:
Pass an error code correctly if phy.acquire() failed.
This is not a real bug because the return value is not used.
To generate a diff of this commit:
cvs rdiff -u -r1.754 -r1.755 src/sys/dev/pci/if_wm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.754 src/sys/dev/pci/if_wm.c:1.755
--- src/sys/dev/pci/if_wm.c:1.754 Mon Aug 8 07:44:40 2022
+++ src/sys/dev/pci/if_wm.c Mon Aug 8 07:49:18 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.754 2022/08/08 07:44:40 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.755 2022/08/08 07:49:18 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.754 2022/08/08 07:44:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.755 2022/08/08 07:49:18 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -16399,9 +16399,10 @@ wm_set_eee_pchlan(struct wm_softc *sc)
return 0;
}
- if (sc->phy.acquire(sc)) {
+ rv = sc->phy.acquire(sc);
+ if (rv != 0) {
device_printf(dev, "%s: failed to get semaphore\n", __func__);
- return 0;
+ return rv;
}
rv = sc->phy.readreg_locked(dev, 1, I82579_LPI_CTRL, &lpi_ctrl);