aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/wavefront/wavefront_fx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/wavefront/wavefront_fx.c')
-rw-r--r--sound/isa/wavefront/wavefront_fx.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c
index dfc449a2194e..5e6870baa296 100644
--- a/sound/isa/wavefront/wavefront_fx.c
+++ b/sound/isa/wavefront/wavefront_fx.c
@@ -210,15 +210,11 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file,
210 "> 512 bytes to FX\n"); 210 "> 512 bytes to FX\n");
211 return -EIO; 211 return -EIO;
212 } 212 }
213 page_data = kmalloc(r.data[2] * sizeof(short), GFP_KERNEL); 213 page_data = memdup_user((unsigned char __user *)
214 if (!page_data) 214 r.data[3],
215 return -ENOMEM; 215 r.data[2] * sizeof(short));
216 if (copy_from_user (page_data, 216 if (IS_ERR(page_data))
217 (unsigned char __user *) r.data[3], 217 return PTR_ERR(page_data);
218 r.data[2] * sizeof(short))) {
219 kfree(page_data);
220 return -EFAULT;
221 }
222 pd = page_data; 218 pd = page_data;
223 } 219 }
224 220