Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9600dcf1 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent d6251d44
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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 */
		BUG_ON(hwif->handler);
		ide_unlock_port(hwif);
		plug_device = 1;
		} else
			printk(KERN_ERR "%s: %s: huh? expected NULL handler "
					"on exit\n", __func__, drive->name);
	}
out_handled:
	irq_ret = IRQ_HANDLED;