diff options
author | 2018-02-28 08:17:38 +0100 | |
---|---|---|
committer | 2018-02-28 08:17:54 +0100 | |
commit | 3b8bd500c9953c59e892c41edffeef1f5099e189 (patch) | |
tree | 230c1af6bc6f5d2ed440e5f7265c0f7cbba8b825 /sound/core/control.c | |
parent | ALSA: Use scnprintf() instead of snprintf() for show (diff) | |
parent | ALSA: control: Fix memory corruption risk in snd_ctl_elem_read (diff) | |
download | wireguard-linux-3b8bd500c9953c59e892c41edffeef1f5099e189.tar.xz wireguard-linux-3b8bd500c9953c59e892c41edffeef1f5099e189.zip |
Merge branch 'for-linus' into for-next
Back-merge for applying a cleanup to core/control
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control.c')
-rw-r--r-- | sound/core/control.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 0b3026d937b1..8a77620a3854 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -889,7 +889,7 @@ static int snd_ctl_elem_read(struct snd_card *card, index_offset = snd_ctl_get_ioff(kctl, &control->id); vd = &kctl->vd[index_offset]; - if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_READ) && kctl->get == NULL) + if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_READ) || kctl->get == NULL) return -EPERM; snd_ctl_build_ioff(&control->id, kctl, index_offset); |