Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Fix another locking issue for an error case.
details: https://anonhg.NetBSD.org/src/rev/cb3b8292c5cb
branches: trunk
changeset: 783957:cb3b8292c5cb
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Jan 13 15:34:03 2013 +0000
description:
Fix another locking issue for an error case.
Return a EIO not -EIO (KNF)
>From rmind
diffstat:
sys/dev/usb/if_smsc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r a1d9f6a5db31 -r cb3b8292c5cb sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c Sun Jan 13 15:27:17 2013 +0000
+++ b/sys/dev/usb/if_smsc.c Sun Jan 13 15:34:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.4 2013/01/13 08:38:04 skrll Exp $ */
+/* $NetBSD: if_smsc.c,v 1.5 2013/01/13 15:34:03 skrll Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -292,6 +292,7 @@
smsc_lock_mii(sc);
if (smsc_wait_for_bits(sc, SMSC_MII_ADDR, SMSC_MII_BUSY) != 0) {
smsc_warn_printf(sc, "MII is busy\n");
+ smsc_unlock_mii(sc);
return;
}
@@ -472,7 +473,7 @@
int err;
if (!ifp)
- return (-EIO);
+ return EIO;
err = smsc_read_reg(sc, SMSC_COE_CTRL, &val);
if (err != 0) {
Home |
Main Index |
Thread Index |
Old Index