Skip to content

Commit

Permalink
V4L/DVB (3499): Fix a bug when more than MAXBOARDS were plugged on em…
Browse files Browse the repository at this point in the history
…28xx

Coverity reported a bug at checking max number of supported boards by
em28xx init code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab authored and Linus Torvalds committed Mar 21, 2006
1 parent 5e5890e commit 1947884
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,

model=id->driver_info;

if (nr > EM28XX_MAXBOARDS) {
if (nr >= EM28XX_MAXBOARDS) {
printk (DRIVER_NAME ": Supports only %i em28xx boards.\n",EM28XX_MAXBOARDS);
em28xx_devused&=~(1<<nr);
return -ENOMEM;
Expand Down

0 comments on commit 1947884

Please sign in to comment.