diff options
author | imp <imp@FreeBSD.org> | 2001-08-29 05:11:44 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-08-29 05:11:44 +0000 |
commit | e709622f3f83cc6bf109f88e38eb447089e62283 (patch) | |
tree | 04081b9f1bc15551d11fc331108b0afccf0c4314 /sys/dev/xe | |
parent | c5e4238213ef87e801dceb34c88445700df457a7 (diff) | |
download | FreeBSD-src-e709622f3f83cc6bf109f88e38eb447089e62283.zip FreeBSD-src-e709622f3f83cc6bf109f88e38eb447089e62283.tar.gz |
Add some seat belts. If we set the error rc, then return it and don't
pretend things succeeded. This can happen if the address returned
form bus_alloc_resource for the cis memory is occupied by some of
thing.
Diffstat (limited to 'sys/dev/xe')
-rw-r--r-- | sys/dev/xe/if_xe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c index ee72834..016bb3c 100644 --- a/sys/dev/xe/if_xe.c +++ b/sys/dev/xe/if_xe.c @@ -289,7 +289,7 @@ xe_probe(device_t dev) int buf; u_char ver_str[CISTPL_BUFSIZE>>1]; off_t offs; - int success, rc, i; + int success, rc = 0, i; int rid; struct resource *r; @@ -438,6 +438,8 @@ xe_probe(device_t dev) /* Die now if something went wrong above */ if (success < 3) return ENXIO; + if (rc != 0) + return (rc); /* Check for certain strange CE2's that look like CE's */ if (strcmp(scp->card_type, "CE") == 0) { |