diff options
author | Liam Girdwood <lrg@ti.com> | 2011-07-24 15:59:44 -0400 |
---|---|---|
committer | Paolo Pisati <paolo.pisati@canonical.com> | 2012-08-17 04:18:25 -0400 |
commit | 9e1fc3402e152a0624b4b9028d5285046f29e8d3 (patch) | |
tree | 7c923bb8324dea01bc4a3ac0e1b996915590929f | |
parent | e9965c2a5d98e0d698afe45394b1c77ecc0c99ad (diff) |
Subject: [PATCH 076/104] ALSA: pcm - reject calls to open backend PCMs (temporary)
This stops userspace opening backlemd PCMs.
TODO: rework for upstream.
Signed-off-by: Liam Girdwood <lrg@ti.com>
-rw-r--r-- | sound/core/pcm_native.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index c6698efb44c..0e972485449 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -2036,6 +2036,12 @@ int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, | |||
2036 | goto error; | 2036 | goto error; |
2037 | } | 2037 | } |
2038 | 2038 | ||
2039 | if (substream->ops == NULL) { | ||
2040 | snd_printd("cannot open back end PCMs directly\n"); | ||
2041 | err = -ENODEV; | ||
2042 | goto error; | ||
2043 | } | ||
2044 | |||
2039 | if ((err = substream->ops->open(substream)) < 0) | 2045 | if ((err = substream->ops->open(substream)) < 0) |
2040 | goto error; | 2046 | goto error; |
2041 | 2047 | ||