From: Santosh Kumar Singh Date: Mon, 19 Dec 2016 17:12:07 +0000 (-0200) Subject: [media] ivtv: Clean up file handle in open() error path X-Git-Tag: v4.11-rc1~132^2~147 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c5b81fe36cc6ff2e5426dbee6c665a90f640069a;p=karo-tx-linux.git [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c index 6f076d8e68da..885cfddfc0f0 100644 --- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c +++ b/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; }