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:
parent
8487d0e93a
commit
4ca62584a4
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue