From c1b87aadd47e5a69ae110139ac7dd1823663089c Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 1 Feb 2008 23:09:36 +0100 Subject: [PATCH] --- yaml --- r: 82160 b: refs/heads/master c: cae5c82022cd710ff1eedd39ca8c56b081177b18 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-probe.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 18a3367195d7..d99ea37a3662 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 96e5ad309c423bc0793e746337d5632ee5a49769 +refs/heads/master: cae5c82022cd710ff1eedd39ca8c56b081177b18 diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index 84810aa57a67..88c77d63c01f 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -996,6 +996,7 @@ static int init_irq (ide_hwif_t *hwif) 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, @@ -1075,7 +1076,6 @@ static int init_irq (ide_hwif_t *hwif) out_unlink: spin_lock_irq(&ide_lock); if (hwif->next == hwif) { - BUG_ON(match); BUG_ON(hwgroup->hwif != hwif); kfree(hwgroup); } else { @@ -1085,8 +1085,7 @@ static int init_irq (ide_hwif_t *hwif) 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);