summaryrefslogtreecommitdiff
path: root/sound/core/control.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-02-28 08:17:38 +0100
committerTakashi Iwai <tiwai@suse.de>2018-02-28 08:17:54 +0100
commit3b8bd500c9953c59e892c41edffeef1f5099e189 (patch)
tree230c1af6bc6f5d2ed440e5f7265c0f7cbba8b825 /sound/core/control.c
parentef21e1750158558d8369067e94d02d285011c37e (diff)
parent5a23699a39abc5328921a81b89383d088f6ba9cc (diff)
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.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,
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);