aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/control.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-20 06:27:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-20 06:27:18 -0400
commit4958134df54c2c84e9c22ea042761d439164d26e (patch)
tree503177afab11f7d25b12a84ce25b481d305c51ba /sound/core/control.c
parentc4f528795d1add8b63652673f7262729f679c6c1 (diff)
parentc698ca5278934c0ae32297a8725ced2e27585d7f (diff)
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/core/control.c')
-rw-r--r--sound/core/control.c2
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,
889 889
890 index_offset = snd_ctl_get_ioff(kctl, &control->id); 890 index_offset = snd_ctl_get_ioff(kctl, &control->id);
891 vd = &kctl->vd[index_offset]; 891 vd = &kctl->vd[index_offset];
892 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_READ) && kctl->get == NULL) 892 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_READ) || kctl->get == NULL)
893 return -EPERM; 893 return -EPERM;
894 894
895 snd_ctl_build_ioff(&control->id, kctl, index_offset); 895 snd_ctl_build_ioff(&control->id, kctl, index_offset);