Staging: comedi: dt2801.c: off by one issue

"dac_range_table" has 5 elements.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Dan Carpenter 2010-03-28 14:48:34 +03:00 committed by Greg Kroah-Hartman
parent 8487d0e93a
commit 4ca62584a4
1 changed files with 1 additions and 1 deletions

View File

@ -472,7 +472,7 @@ static const struct comedi_lrange *dac_range_table[] = {
static const struct comedi_lrange *dac_range_lkup(int opt)
{
if (opt < 0 || opt > 5)
if (opt < 0 || opt >= 5)
return &range_unknown;
return dac_range_table[opt];
}