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

Commit 439300b6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Set file private data to NULL on close"

parents 90422674 723c9527
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -39,6 +39,8 @@ struct msm_vidc_drv *vidc_driver;

static inline struct msm_vidc_inst *get_vidc_inst(struct file *filp, void *fh)
{
	if (!filp->private_data)
		return NULL;
	return container_of(filp->private_data,
					struct msm_vidc_inst, event_handler);
}
@@ -74,6 +76,7 @@ static int msm_v4l2_close(struct file *filp)
	vidc_inst = get_vidc_inst(filp, NULL);

	rc = msm_vidc_close(vidc_inst);
	filp->private_data = NULL;
	trace_msm_v4l2_vidc_close_end("msm_v4l2_close end");
	return rc;
}