]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[media] ivtv: Clean up file handle in open() error path
authorSantosh Kumar Singh <kumar.san1093@gmail.com>
Mon, 19 Dec 2016 17:12:07 +0000 (15:12 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 09:45:47 +0000 (07:45 -0200)
Fix to avoid possible exit file handle in error paths.

Signed-off-by: Santosh Kumar Singh <kumar.san1093@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ivtv/ivtv-alsa-pcm.c

index 6f076d8e68da8c0db314e02302518a3f4c485fad..885cfddfc0f0dc1634dbb873a7e53a27f12d6bff 100644 (file)
@@ -169,6 +169,7 @@ static int snd_ivtv_pcm_capture_open(struct snd_pcm_substream *substream)
        /* See if the stream is available */
        if (ivtv_claim_stream(&item, item.type)) {
                /* No, it's already in use */
+               v4l2_fh_exit(&item.fh);
                snd_ivtv_unlock(itvsc);
                return -EBUSY;
        }