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

Commit d4175037 authored by Arun Menon's avatar Arun Menon
Browse files

msm: vidc: Add null check in msm_venc_stop_streaming



Return from msm_venc_stop_streaming in case of invalid
input arguments. Without this change, we will hit a
NULL pointer exception.

Change-Id: I164d0f27c28d10313475be680ecab56b9f16f429
Signed-off-by: default avatarArun Menon <avmenon@codeaurora.org>
parent 66f4f85a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1511,7 +1511,8 @@ static void msm_venc_stop_streaming(struct vb2_queue *q)
	struct msm_vidc_inst *inst;
	int rc = 0;
	if (!q || !q->drv_priv) {
		dprintk(VIDC_ERR, "Invalid input, q = %p\n", q);
		dprintk(VIDC_ERR, "%s - Invalid input, q = %p\n", __func__, q);
		return;
	}

	inst = q->drv_priv;