diff options
author | Santosh Kumar Singh <kumar.san1093@gmail.com> | 2016-12-19 15:20:37 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 07:46:09 -0200 |
commit | 01faa0d9c79e9c6a52d33e01f953588a946e3d87 (patch) | |
tree | e65acefddaf8d62dd642cd262abe17316501de67 /drivers/media | |
parent | c5b81fe36cc6ff2e5426dbee6c665a90f640069a (diff) |
[media] pvrusb2: 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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 88283d7229f0..8f13c60198ed 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -1050,7 +1050,7 @@ static int pvr2_v4l2_open(struct file *file) pvr2_trace(PVR2_TRACE_STRUCT, "Destroying pvr_v4l2_fh id=%p (input mask error)", fhp); - + v4l2_fh_exit(&fhp->fh); kfree(fhp); return ret; } @@ -1067,6 +1067,7 @@ static int pvr2_v4l2_open(struct file *file) pvr2_trace(PVR2_TRACE_STRUCT, "Destroying pvr_v4l2_fh id=%p (input map failure)", fhp); + v4l2_fh_exit(&fhp->fh); kfree(fhp); return -ENOMEM; } |