diff options
author | Vasiliy Kulikov <segooon@gmail.com> | 2010-09-05 22:32:33 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-05 16:59:51 -0700 |
commit | 81604d43ade6abd316444f99ddb633f2e5a3f3eb (patch) | |
tree | 073c519461a6bd77911969d8da60a387ff8e4c8d /drivers/staging/comedi | |
parent | b04462a143afde542ad9e5a1df4fcfbff6d30249 (diff) | |
download | kernel_samsung_tuna-81604d43ade6abd316444f99ddb633f2e5a3f3eb.zip kernel_samsung_tuna-81604d43ade6abd316444f99ddb633f2e5a3f3eb.tar.gz kernel_samsung_tuna-81604d43ade6abd316444f99ddb633f2e5a3f3eb.tar.bz2 |
staging: comedi: check return code of put_user
Function put_user may fail. Check for it.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 1409131..98fa255 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -537,7 +537,8 @@ static int do_chaninfo_ioctl(struct comedi_device *dev, x = (dev->minor << 28) | (it.subdev << 24) | (i << 16) | (s->range_table_list[i]->length); - put_user(x, it.rangelist + i); + if (put_user(x, it.rangelist + i)) + return -EFAULT; } #if 0 if (copy_to_user(it.rangelist, s->range_type_list, |