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>
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index c6698ef..0e97248 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2036,6 +2036,12 @@
goto error;
}
+ if (substream->ops == NULL) {
+ snd_printd("cannot open back end PCMs directly\n");
+ err = -ENODEV;
+ goto error;
+ }
+
if ((err = substream->ops->open(substream)) < 0)
goto error;