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>
This commit is contained in:
committed by
Sebastien Guiriec
parent
ad2581ef84
commit
8ccfb4a31f
@@ -2036,6 +2036,12 @@ int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user