diff options
-rw-r--r-- | drivers/ide/ide-probe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 84810aa57a67..88c77d63c01f 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -996,6 +996,7 @@ static int init_irq (ide_hwif_t *hwif) | |||
996 | spin_lock_irq(&ide_lock); | 996 | spin_lock_irq(&ide_lock); |
997 | hwif->next = hwgroup->hwif->next; | 997 | hwif->next = hwgroup->hwif->next; |
998 | hwgroup->hwif->next = hwif; | 998 | hwgroup->hwif->next = hwif; |
999 | BUG_ON(hwif->next == hwif); | ||
999 | spin_unlock_irq(&ide_lock); | 1000 | spin_unlock_irq(&ide_lock); |
1000 | } else { | 1001 | } else { |
1001 | hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO, | 1002 | hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO, |
@@ -1075,7 +1076,6 @@ static int init_irq (ide_hwif_t *hwif) | |||
1075 | out_unlink: | 1076 | out_unlink: |
1076 | spin_lock_irq(&ide_lock); | 1077 | spin_lock_irq(&ide_lock); |
1077 | if (hwif->next == hwif) { | 1078 | if (hwif->next == hwif) { |
1078 | BUG_ON(match); | ||
1079 | BUG_ON(hwgroup->hwif != hwif); | 1079 | BUG_ON(hwgroup->hwif != hwif); |
1080 | kfree(hwgroup); | 1080 | kfree(hwgroup); |
1081 | } else { | 1081 | } else { |
@@ -1085,8 +1085,7 @@ out_unlink: | |||
1085 | g = g->next; | 1085 | g = g->next; |
1086 | g->next = hwif->next; | 1086 | g->next = hwif->next; |
1087 | if (hwgroup->hwif == hwif) { | 1087 | if (hwgroup->hwif == hwif) { |
1088 | /* Impossible. */ | 1088 | BUG_ON(hwgroup->drive); |
1089 | printk(KERN_ERR "Duh. Uninitialized hwif listed as active hwif.\n"); | ||
1090 | hwgroup->hwif = g; | 1089 | hwgroup->hwif = g; |
1091 | } | 1090 | } |
1092 | BUG_ON(hwgroup->hwif == hwif); | 1091 | BUG_ON(hwgroup->hwif == hwif); |