diff options
Diffstat (limited to 'drivers/parport')
-rw-r--r-- | drivers/parport/parport_serial.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index e2e95b36a603..101ed49a2d15 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c @@ -70,6 +70,8 @@ static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc * parallel ports and <S> is the number of serial ports. */ card->numports = (dev->subsystem_device & 0xf0) >> 4; + if (card->numports > ARRAY_SIZE(card->addr)) + card->numports = ARRAY_SIZE(card->addr); return 0; } |