From 4e77d278204094cfe64cfc8748a47ebea9d9d7ba Mon Sep 17 00:00:00 2001 From: wpaul Date: Thu, 22 Jul 1999 03:59:22 +0000 Subject: Small tweak to newbus changes: return error status on failure correctly in xl_attach() (not a problem if the attach never fails, but if it does the function would still return 0, which is wrong). --- sys/pci/if_xl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index fbe1e5c..fad4143 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -1412,7 +1412,7 @@ xl_attach(dev) caddr_t roundptr; struct xl_type *p; u_int16_t phy_vid, phy_did, phy_sts; - int unit, error, rid; + int unit, error = 0, rid; s = splimp(); @@ -1812,7 +1812,7 @@ xl_attach(dev) fail: splx(s); - return(0); + return(error); } static int xl_detach(dev) -- cgit v1.1