ISAPnP: only invalidate card references when disabling the card
This commit is contained in:
@@ -913,11 +913,13 @@ isapnp_enable_card(void *priv, uint8_t enable)
|
||||
card->state = (enable == 2) ? PNP_STATE_CONFIG : PNP_STATE_WAIT_FOR_KEY;
|
||||
|
||||
/* Invalidate other references if we're disabling this card. */
|
||||
if (dev->isolated_card == card)
|
||||
dev->isolated_card = NULL;
|
||||
if (dev->current_ld_card == card) {
|
||||
dev->current_ld = NULL;
|
||||
dev->current_ld_card = NULL;
|
||||
if (!card->enable) {
|
||||
if (dev->isolated_card == card)
|
||||
dev->isolated_card = NULL;
|
||||
if (dev->current_ld_card == card) {
|
||||
dev->current_ld = NULL;
|
||||
dev->current_ld_card = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user