diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-04-17 16:18:22 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-04-17 16:18:28 +0200 |
| commit | 5043124e660fcc3ddefe4239ddfa017bf13f5081 (patch) | |
| tree | 06875cdb942afe460dbac33acf3e8223c805a35d /sound/core/timer.c | |
| parent | 77857dc07247ed5fa700a197c96ef842d8dbebdf (diff) | |
| parent | 9f76208c33984ab777eace5d07a4e36e88703e02 (diff) | |
Merge branch 'linus' into x86/apic
Merge reason: new intr-remap patches depend on the s2ram iommu fixes from upstream
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'sound/core/timer.c')
| -rw-r--r-- | sound/core/timer.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 3f0050d0b71e..8f8b17ac074d 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1395,13 +1395,10 @@ static int snd_timer_user_ginfo(struct file *file, struct list_head *p; int err = 0; - ginfo = kmalloc(sizeof(*ginfo), GFP_KERNEL); - if (! ginfo) - return -ENOMEM; - if (copy_from_user(ginfo, _ginfo, sizeof(*ginfo))) { - kfree(ginfo); - return -EFAULT; - } + ginfo = memdup_user(_ginfo, sizeof(*ginfo)); + if (IS_ERR(ginfo)) + return PTR_ERR(ginfo); + tid = ginfo->tid; memset(ginfo, 0, sizeof(*ginfo)); ginfo->tid = tid; |
