From: Jiri Slaby Date: Fri, 24 Feb 2012 11:10:18 +0000 (+0100) Subject: [IA64] simserial, bail out when request_irq fails X-Git-Tag: Ubuntu-5.2.0-15.16~18456^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=0efb34f298b6b12dc9377159c8a6d1b7b73b03bf;p=mirror_ubuntu-eoan-kernel.git [IA64] simserial, bail out when request_irq fails Without this, the code succeeds when the port is opened by root and we get unwanted interrupts storm on the first key stroke. Instead of that, tell the user we failed and that we won't continue. I suppose, the code was copied from the serial layer where we may want to change the irq number, so we must allow open even of the failing port. This is not the case for this driver at all. Signed-off-by: Jiri Slaby Signed-off-by: Tony Luck --- diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 797e89a6c4eb..60c9093bbeae 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c @@ -702,15 +702,8 @@ startup(struct async_struct *info) handler = rs_interrupt_single; retval = request_irq(state->irq, handler, IRQ_T(info), "simserial", NULL); - if (retval) { - if (capable(CAP_SYS_ADMIN)) { - if (info->tty) - set_bit(TTY_IO_ERROR, - &info->tty->flags); - retval = 0; - } + if (retval) goto errout; - } } /*