Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Pass an error code correctly if phy.acquire() fa...
details: https://anonhg.NetBSD.org/src/rev/495f375b6c78
branches: trunk
changeset: 368851:495f375b6c78
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Aug 08 07:49:18 2022 +0000
description:
Pass an error code correctly if phy.acquire() failed.
This is not a real bug because the return value is not used.
diffstat:
sys/dev/pci/if_wm.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 05f545c9675f -r 495f375b6c78 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Mon Aug 08 07:44:40 2022 +0000
+++ b/sys/dev/pci/if_wm.c Mon Aug 08 07:49:18 2022 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index