diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 19:54:53 (GMT) |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 20:01:40 (GMT) |
commit | ae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch) | |
tree | 3c2086ab67398a019089a47ca3f362a4bc6db74f /drivers/staging/comedi/range.c | |
parent | 34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff) | |
parent | 9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff) | |
download | linux-fsl-qoriq-ae19ffbadc1b2100285a5b5b3d0a4e0a11390904.tar.xz |
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/staging/comedi/range.c')
-rw-r--r-- | drivers/staging/comedi/range.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c index 445909e..8313dfc 100644 --- a/drivers/staging/comedi/range.c +++ b/drivers/staging/comedi/range.c @@ -78,7 +78,7 @@ int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) } if (copy_to_user(it.range_ptr, lr->range, - sizeof(struct comedi_krange) * lr->length)) + sizeof(struct comedi_krange) * lr->length)) return -EFAULT; return 0; @@ -128,11 +128,12 @@ int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist) if (s->range_table) { for (i = 0; i < n; i++) if (CR_CHAN(chanlist[i]) >= s->n_chan || - CR_RANGE(chanlist[i]) >= s->range_table->length - || aref_invalid(s, chanlist[i])) { - printk("bad chanlist[%d]=0x%08x n_chan=%d range length=%d\n", - i, chanlist[i], s->n_chan, - s->range_table->length); + CR_RANGE(chanlist[i]) >= s->range_table->length + || aref_invalid(s, chanlist[i])) { + printk + ("bad chanlist[%d]=0x%08x n_chan=%d range length=%d\n", + i, chanlist[i], s->n_chan, + s->range_table->length); #if 0 for (i = 0; i < n; i++) printk("[%d]=0x%08x\n", i, chanlist[i]); @@ -143,11 +144,11 @@ int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist) for (i = 0; i < n; i++) { chan = CR_CHAN(chanlist[i]); if (chan >= s->n_chan || - CR_RANGE(chanlist[i]) >= - s->range_table_list[chan]->length - || aref_invalid(s, chanlist[i])) { + CR_RANGE(chanlist[i]) >= + s->range_table_list[chan]->length + || aref_invalid(s, chanlist[i])) { printk("bad chanlist[%d]=0x%08x\n", i, - chanlist[i]); + chanlist[i]); return -EINVAL; } } |