spin_lock_irq(&ide_lock);
hwif->next = hwgroup->hwif->next;
hwgroup->hwif->next = hwif;
+ BUG_ON(hwif->next == hwif);
spin_unlock_irq(&ide_lock);
} else {
hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
out_unlink:
spin_lock_irq(&ide_lock);
if (hwif->next == hwif) {
- BUG_ON(match);
BUG_ON(hwgroup->hwif != hwif);
kfree(hwgroup);
} else {
g = g->next;
g->next = hwif->next;
if (hwgroup->hwif == hwif) {
- /* Impossible. */
- printk(KERN_ERR "Duh. Uninitialized hwif listed as active hwif.\n");
+ BUG_ON(hwgroup->drive);
hwgroup->hwif = g;
}
BUG_ON(hwgroup->hwif == hwif);