Commit 01faa0d9 authored by Santosh Kumar Singh's avatar Santosh Kumar Singh Committed by Mauro Carvalho Chehab

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

Fix to avoid possible exit file handle in error paths.
Signed-off-by: default avatarSantosh Kumar Singh <kumar.san1093@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent c5b81fe3
...@@ -1050,7 +1050,7 @@ static int pvr2_v4l2_open(struct file *file) ...@@ -1050,7 +1050,7 @@ static int pvr2_v4l2_open(struct file *file)
pvr2_trace(PVR2_TRACE_STRUCT, pvr2_trace(PVR2_TRACE_STRUCT,
"Destroying pvr_v4l2_fh id=%p (input mask error)", "Destroying pvr_v4l2_fh id=%p (input mask error)",
fhp); fhp);
v4l2_fh_exit(&fhp->fh);
kfree(fhp); kfree(fhp);
return ret; return ret;
} }
...@@ -1067,6 +1067,7 @@ static int pvr2_v4l2_open(struct file *file) ...@@ -1067,6 +1067,7 @@ static int pvr2_v4l2_open(struct file *file)
pvr2_trace(PVR2_TRACE_STRUCT, pvr2_trace(PVR2_TRACE_STRUCT,
"Destroying pvr_v4l2_fh id=%p (input map failure)", "Destroying pvr_v4l2_fh id=%p (input map failure)",
fhp); fhp);
v4l2_fh_exit(&fhp->fh);
kfree(fhp); kfree(fhp);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment