--- x/drivers/comedi/drivers/pcl812.c +++ y/drivers/comedi/drivers/pcl812.c @@ -1148,6 +1148,8 @@ static int pcl812_attach(struct comedi_d I8254_OSC_BASE_2MHZ, I8254_IO8, 0); if (IS_ERR(dev->pacer)) return PTR_ERR(dev->pacer); + if (it->options[1] < 0 || it->options[1] > 31) + return -EINVAL; if ((1 << it->options[1]) & board->irq_bits) { ret = request_irq(it->options[1], pcl812_interrupt, 0,