Skip to content

Commit

Permalink
[IA64] simserial, bail out when request_irq fails
Browse files Browse the repository at this point in the history
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 <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Jiri Slaby authored and Tony Luck committed Feb 24, 2012
1 parent cb53485 commit 0efb34f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions arch/ia64/hp/sim/simserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

/*
Expand Down

0 comments on commit 0efb34f

Please sign in to comment.