From e709622f3f83cc6bf109f88e38eb447089e62283 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 29 Aug 2001 05:11:44 +0000 Subject: 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. --- sys/dev/xe/if_xe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev/xe') 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) { -- cgit v1.1