Don't core dump if we can't get the index automatically.

Debug info from:	Ben Hockenhull <benh@jpj.net>
This commit is contained in:
Warner Losh 2001-10-05 20:38:32 +00:00
parent 845bd795c9
commit df306b2647

View File

@ -644,7 +644,8 @@ assign_io(struct slot *sp)
break;
case AUTO_INDEX: /* auto */
cisconf = assign_card_index(sp, cis);
sp->config->index = cisconf->id;
if (cisconf)
sp->config->index = cisconf->id;
break;
default: /* normal, use index value */
for (cisconf = cis->conf; cisconf; cisconf = cisconf->next)