aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ctxfi/ctatc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index 799eb98e779..e54006ef83c 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -445,6 +445,8 @@ atc_pcm_playback_position(struct ct_atc *atc, struct ct_atc_pcm *apcm)
u32 size, max_cisz;
int position;
+ if (!src)
+ return 0;
position = src->ops->get_ca(src);
size = apcm->vm_block->size;
@@ -782,6 +784,8 @@ atc_pcm_capture_position(struct ct_atc *atc, struct ct_atc_pcm *apcm)
{
struct src *src = apcm->src;
+ if (!src)
+ return 0;
return src->ops->get_ca(src) - apcm->vm_block->addr;
}