]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: make "paranoia" ->handler check in ide_intr() more strict
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 6 Jan 2009 16:20:58 +0000 (17:20 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 6 Jan 2009 16:20:58 +0000 (17:20 +0100)
If ->handler is set while it shouldn't be it indicates deep problems
so BUG_ON()-ning and preventing further damage is much more appropriate
than merely printing an error message.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-io.c

index 9d363a1b55734c345ff6f05506017e9bf964aa4e..442904f0d626db5268c1cdb47973ac4716c8e5e5 100644 (file)
@@ -1159,12 +1159,9 @@ irqreturn_t ide_intr (int irq, void *dev_id)
         * won't allow another of the same (on any CPU) until we return.
         */
        if (startstop == ide_stopped) {
-               if (hwif->handler == NULL) {    /* paranoia */
-                       ide_unlock_port(hwif);
-                       plug_device = 1;
-               } else
-                       printk(KERN_ERR "%s: %s: huh? expected NULL handler "
-                                       "on exit\n", __func__, drive->name);
+               BUG_ON(hwif->handler);
+               ide_unlock_port(hwif);
+               plug_device = 1;
        }
 out_handled:
        irq_ret = IRQ_HANDLED;