]> git.hungrycats.org Git - linux/commitdiff
ALSA update
authorJaroslav Kysela <perex@suse.cz>
Wed, 16 Oct 2002 00:05:01 +0000 (02:05 +0200)
committerJaroslav Kysela <perex@suse.cz>
Wed, 16 Oct 2002 00:05:01 +0000 (02:05 +0200)
  - fixed returned structure in ctl_read/write

sound/core/control.c

index f6cce01e089c5f15945bbb7c9c01bf6363aa90a4..7f818300c3b072dea159a99c29e687e694c5a7f9 100644 (file)
@@ -454,7 +454,7 @@ static int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *_control)
        }
        read_unlock(&card->control_rwlock);
        if (result >= 0)
-               if (copy_to_user(_control, &control, sizeof(control)))
+               if (copy_to_user(_control, control, sizeof(*control)))
                        return -EFAULT;
        kfree(control);
        return result;
@@ -503,7 +503,7 @@ static int snd_ctl_elem_write(snd_ctl_file_t *file, snd_ctl_elem_value_t *_contr
        read_unlock(&card->control_rwlock);
       __unlocked:
        if (result >= 0)
-               if (copy_to_user(_control, &control, sizeof(control)))
+               if (copy_to_user(_control, control, sizeof(*control)))
                        return -EFAULT;
        kfree(control);
        return result;