aboutsummaryrefslogtreecommitdiff
path: root/sound/oss/opl3.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/opl3.c')
-rw-r--r--sound/oss/opl3.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c
index c828a340c1bd..4e912dd3b35e 100644
--- a/sound/oss/opl3.c
+++ b/sound/oss/opl3.c
@@ -819,7 +819,7 @@ static void opl3_hw_control(int dev, unsigned char *event)
}
static int opl3_load_patch(int dev, int format, const char __user *addr,
- int offs, int count, int pmgr_flag)
+ int count, int pmgr_flag)
{
struct sbi_instrument ins;
@@ -829,11 +829,7 @@ static int opl3_load_patch(int dev, int format, const char __user *addr,
return -EINVAL;
}
- /*
- * What the fuck is going on here? We leave junk in the beginning
- * of ins and then check the field pretty close to that beginning?
- */
- if(copy_from_user(&((char *) &ins)[offs], addr + offs, sizeof(ins) - offs))
+ if (copy_from_user(&ins, addr, sizeof(ins)))
return -EFAULT;
if (ins.channel < 0 || ins.channel >= SBFM_MAXINSTR)