Merge remote-tracking branch 'lsk/v3.10/topic/gator' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / drivers / media / pci / ivtv / ivtv-alsa-pcm.c
index e1863dbf4edcaca3376321b116d58b2606e2252c..7a9b98bc208bc252ae9d1dc334fabb48bf39c5f5 100644 (file)
@@ -159,6 +159,12 @@ static int snd_ivtv_pcm_capture_open(struct snd_pcm_substream *substream)
 
        /* Instruct the CX2341[56] to start sending packets */
        snd_ivtv_lock(itvsc);
+
+       if (ivtv_init_on_first_open(itv)) {
+               snd_ivtv_unlock(itvsc);
+               return -ENXIO;
+       }
+
        s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM];
 
        v4l2_fh_init(&item.fh, s->vdev);