[PATCH] ivtv: Clean up file handle in open() error path.

From: Santosh Kumar Singh
Date: Mon Dec 19 2016 - 12:13:06 EST


Fix to avoid possible exit file handle in error paths.

Signed-off-by: Santosh Kumar Singh <kumar.san1093@xxxxxxxxx>
---
drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
index a26f980..d0d2c93 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
+++ b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
@@ -174,6 +174,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;
}
--
1.9.1