Commit 19478843 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds

V4L/DVB (3499): Fix a bug when more than MAXBOARDS were plugged on em28xx

Coverity reported a bug at checking max number of supported boards by
em28xx init code.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 5e5890e1
...@@ -1949,7 +1949,7 @@ static int em28xx_usb_probe(struct usb_interface *interface, ...@@ -1949,7 +1949,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
model=id->driver_info; model=id->driver_info;
if (nr > EM28XX_MAXBOARDS) { if (nr >= EM28XX_MAXBOARDS) {
printk (DRIVER_NAME ": Supports only %i em28xx boards.\n",EM28XX_MAXBOARDS); printk (DRIVER_NAME ": Supports only %i em28xx boards.\n",EM28XX_MAXBOARDS);
em28xx_devused&=~(1<<nr); em28xx_devused&=~(1<<nr);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment