Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
	}