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

Commit 2e66c805 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: soc: qcom: Add error handling in function avtimer_ioctl" into msm-4.9

parents 4dac6aad d6fb56db
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -332,9 +332,17 @@ static long avtimer_ioctl(struct file *file, unsigned int ioctl_num,
	switch (ioctl_num) {
	case IOCTL_GET_AVTIMER_TICK:
	{
		uint64_t avtimer_tick;
		uint64_t avtimer_tick = 0;
		int rc;

		rc = avcs_core_query_timer(&avtimer_tick);

		if (rc) {
			pr_err("%s: Error: Invalid AV Timer tick, rc = %d\n",
				__func__, rc);
			return rc;
		}

		avcs_core_query_timer(&avtimer_tick);
		pr_debug_ratelimited("%s: AV Timer tick: time %llx\n",
		__func__, avtimer_tick);
		if (copy_to_user((void *) ioctl_param, &avtimer_tick,