summaryrefslogtreecommitdiffstats
path: root/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'core.c')
-rw-r--r--core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/core.c b/core.c
index a733118..c758391 100644
--- a/core.c
+++ b/core.c
@@ -242,6 +242,12 @@ static struct snd_pcm *pcm_create(struct snd_avirt_stream *stream)
pcm_ops_ap = (struct snd_pcm_ops *)audiopath->pcm_capture_ops;
capture = true;
}
+ if (!pcm_ops_ap) {
+ D_ERRORK("No PCM ops for direction '%s' for Audio Path: %s",
+ (stream->direction) ? "capture" : "playback",
+ stream->map);
+ return ERR_PTR(-EFAULT);
+ }
pcm_ops = &pcm_ops_avirt;
/* Set PCM ops for the Audio Path*/