summaryrefslogtreecommitdiff
path: root/drivers/misc/dummy-irq.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-23 09:26:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-23 09:26:32 -0700
commit5cc0c03823ca18c490f8223f85ed40f2a9d936c4 (patch)
treea05b7a2a1153efff01a78dc54e2102420e2c29bb /drivers/misc/dummy-irq.c
parentb64194068bbbdef3cc235f5459616a330f3b7724 (diff)
parentb5325a02aa84c794cf520d6d68cae4b150988a32 (diff)
Merge tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg Kroah-Hartman: "Here are some small char/misc driver fixes for 3.10-rc2. Nothing major here, just a number of fixes for things that people have reported, and a MAINTAINERS update for the recent changes for the hyperv files that went into 3.10-rc1." * tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: ttyprintk: Fix NULL pointer deref by setting tty_port ops after initializing port uio: UIO_DMEM_GENIRQ should depend on HAS_DMA MAINTAINERS: update Hyper-V file list mei: bus: Reset event_cb when disabling a device Drivers: hv: Fix a bug in get_vp_index() mei: fix out of array access to me clients array Char: lp, protect LPGETSTATUS with port_mutex dummy-irq: require the user to specify an IRQ number
Diffstat (limited to 'drivers/misc/dummy-irq.c')
-rw-r--r--drivers/misc/dummy-irq.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/misc/dummy-irq.c b/drivers/misc/dummy-irq.c
index 7014167e2c61..c37eeedfe215 100644
--- a/drivers/misc/dummy-irq.c
+++ b/drivers/misc/dummy-irq.c
@@ -19,7 +19,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
-static int irq;
+static int irq = -1;
static irqreturn_t dummy_interrupt(int irq, void *dev_id)
{
@@ -36,6 +36,10 @@ static irqreturn_t dummy_interrupt(int irq, void *dev_id)
static int __init dummy_irq_init(void)
{
+ if (irq < 0) {
+ printk(KERN_ERR "dummy-irq: no IRQ given. Use irq=N\n");
+ return -EIO;
+ }
if (request_irq(irq, &dummy_interrupt, IRQF_SHARED, "dummy_irq", &irq)) {
printk(KERN_ERR "dummy-irq: cannot register IRQ %d\n", irq);
return -EIO;