Эх сурвалжийг харах

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

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>
Santosh Kumar Singh 8 жил өмнө
parent
commit
c5b81fe36c

+ 1 - 0
drivers/media/pci/ivtv/ivtv-alsa-pcm.c

@@ -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;
 	}