summaryrefslogtreecommitdiffstats
path: root/arch/ia64/hp/sim
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-03-08 21:01:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 12:26:31 -0800
commit9e12dd5fce1c676e709625bd2f55dc83664c3c93 (patch)
tree5a93e4e2a7bcb4431dc3777423c6bc3ac3e7b85c /arch/ia64/hp/sim
parent6efb6b77ff6fd512e9ef45b29f1940cb924cd7a6 (diff)
downloadop-kernel-dev-9e12dd5fce1c676e709625bd2f55dc83664c3c93.zip
op-kernel-dev-9e12dd5fce1c676e709625bd2f55dc83664c3c93.tar.gz
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 <jslaby@suse.cz> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/ia64/hp/sim')
-rw-r--r--arch/ia64/hp/sim/simserial.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 3a079de..8f68972 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -692,15 +692,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;
- }
}
/*
OpenPOWER on IntegriCloud