diff options
| author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:58 -0500 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:58 -0500 |
| commit | 9600dcf1347d304cf4dff34ef50569d6584b6968 (patch) | |
| tree | 30923b41dbc75151efc676097af416a3af6d85a6 | |
| parent | d6251d4488a361c93da2398818e1ec69cffb6073 (diff) | |
ide: make "paranoia" ->handler check in ide_intr() more strict
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>
| -rw-r--r-- | drivers/ide/ide-io.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 9d363a1b5573..442904f0d626 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
| @@ -1159,12 +1159,9 @@ irqreturn_t ide_intr (int irq, void *dev_id) | |||
| 1159 | * won't allow another of the same (on any CPU) until we return. | 1159 | * won't allow another of the same (on any CPU) until we return. |
| 1160 | */ | 1160 | */ |
| 1161 | if (startstop == ide_stopped) { | 1161 | if (startstop == ide_stopped) { |
| 1162 | if (hwif->handler == NULL) { /* paranoia */ | 1162 | BUG_ON(hwif->handler); |
| 1163 | ide_unlock_port(hwif); | 1163 | ide_unlock_port(hwif); |
| 1164 | plug_device = 1; | 1164 | plug_device = 1; |
| 1165 | } else | ||
| 1166 | printk(KERN_ERR "%s: %s: huh? expected NULL handler " | ||
| 1167 | "on exit\n", __func__, drive->name); | ||
| 1168 | } | 1165 | } |
| 1169 | out_handled: | 1166 | out_handled: |
| 1170 | irq_ret = IRQ_HANDLED; | 1167 | irq_ret = IRQ_HANDLED; |
