summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-12-03 14:52:47 +0100
committerTakashi Iwai <tiwai@suse.de>2024-12-03 15:20:31 +0100
commitd7b6d5d949ca73d51123a9e95e141376e04609f0 (patch)
tree0feec39925e6c6bafd4db484100b96cdd46b3c2d
parent24a53864da2623bd90ecd51abdfb60426dc89abe (diff)
ALSA: hda: Always check capability at opening a hwdep
We have a capability check at hda_hwdep_open(), but it's applied only conditionally and the check is skipped when CONFIG_SND_DEBUG_VERBOSE is set. This is rather inconsistent behavior, and we should apply the check always no matter which config is chosen. Link: https://patch.msgid.link/20241203135248.19840-1-tiwai@suse.de Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/hda_hwdep.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index 727f39acedfc..9325e5c3cbe6 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -84,10 +84,8 @@ static int hda_hwdep_ioctl_compat(struct snd_hwdep *hw, struct file *file,
static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file)
{
-#ifndef CONFIG_SND_DEBUG_VERBOSE
if (!capable(CAP_SYS_RAWIO))
return -EACCES;
-#endif
return 0;
}