From 673ea6e36c81434da9713845dbecf04e8244f11f Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 6 Sep 2003 00:34:36 -0700 Subject: [PATCH] [PATCH] janitor: oss/ite8172 copy*user fixes This patch catches insures proper return values from copy_to/from_user calls. From: Ron Gage --- sound/oss/ite8172.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c index b759a46808aff..1e3ae3a3909af 100644 --- a/sound/oss/ite8172.c +++ b/sound/oss/ite8172.c @@ -1655,7 +1655,7 @@ static int it8172_ioctl(struct inode *inode, struct file *file, if (count < 0) count = 0; cinfo.blocks = count >> s->dma_adc.fragshift; - return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)); + return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0; case SNDCTL_DSP_GETOPTR: if (!(file->f_mode & FMODE_READ)) @@ -1678,7 +1678,7 @@ static int it8172_ioctl(struct inode *inode, struct file *file, if (count < 0) count = 0; cinfo.blocks = count >> s->dma_dac.fragshift; - return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)); + return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0; case SNDCTL_DSP_GETBLKSIZE: if (file->f_mode & FMODE_WRITE) -- 2.53.0